Syntax
B = A.'
B = transpose(A)
Description
B = A.'
returns the nonconjugate transpose of A
, that is, interchanges the row and column index for each element. If A
contains complex elements, then A.'
does not affect the sign of the imaginary parts. For example, if A(3,2)
is 1+2i
and B = A.'
, then the element B(2,3)
is also 1+2i
.
B = transpose(A)
is an alternate way to execute A.'
and enables operator overloading for classes.
Create a matrix containing complex elements and compute its nonconjugate transpose. B
contains the same elements as A
, except the rows and columns are interchanged. The signs of the imaginary parts are unchanged.
A = [1 3 4-1i 2+2i; 0+1i 1-1i 5 6-1i]
A =
1.0000 + 0.0000i 3.0000 + 0.0000i 4.0000 - 1.0000i 2.0000 + 2.0000i
0.0000 + 1.0000i 1.0000 - 1.0000i 5.0000 + 0.0000i 6.0000 - 1.0000i
B = A.'
B =
1.0000 + 0.0000i 0.0000 + 1.0000i
3.0000 + 0.0000i 1.0000 - 1.0000i
4.0000 - 1.0000i 5.0000 + 0.0000i
2.0000 + 2.0000i 6.0000 - 1.0000i
Create a 2-by-2 matrix with complex elements.
A = [0-1i 2+1i;4+2i 0-2i]
A =
0.0000 - 1.0000i 2.0000 + 1.0000i
4.0000 + 2.0000i 0.0000 - 2.0000i
Find the conjugate transpose of A
.
B = A'
B =
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.