ctranspose - Complex conjugate transpose - MATLAB (original) (raw)

Main Content

Complex conjugate transpose

Syntax

Description

B = ctranspose([A](#buaudse-1-A)) is an alternate way to execute A', but is rarely used. It enables operator overloading for classes.

Examples

collapse all

Create a 4-by-2 matrix.

Find the conjugate transpose of A.

The result is a 2-by-4 matrix. B has the same elements as A, but the row and column index for each element are interchanged. When no complex elements are present, A' produces the same result as A.'.

Create a 2-by-2 matrix with complex elements.

A = [0-1i 2+1i;4+2i 0-2i]

A = 2×2 complex

0.0000 - 1.0000i 2.0000 + 1.0000i 4.0000 + 2.0000i 0.0000 - 2.0000i

Find the conjugate transpose of A.

B = 2×2 complex

0.0000 + 1.0000i 4.0000 - 2.0000i 2.0000 - 1.0000i 0.0000 + 2.0000i

The result, B, contains the elements of A with the row and column indices interchanged. The sign of the imaginary part of each number is also switched.

Input Arguments

collapse all

Input array, specified as a vector or matrix.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | char | string | struct | cell | categorical | datetime | duration | calendarDuration
Complex Number Support: Yes

More About

collapse all

The complex conjugate transpose of a matrix interchanges the row and column index for each element, reflecting the elements across the main diagonal. The operation also negates the imaginary part of any complex numbers.

For example, if B = A' and A(1,2) is1+1i, then the element B(2,1) is1-1i.

Tips

Extended Capabilities

expand all

The ctranspose function fully supports GPU arrays. To run the function on a GPU, specify the input data as a gpuArray (Parallel Computing Toolbox). For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).

Version History

Introduced before R2006a