Calculate Complex Conjugate Transpose in MATLAB
Last Updated :
21 Nov, 2022
The complex conjugate transpose of a matrix is the matrix obtained by transposing the original matrix and then applying the complex conjugate property of complex numbers on each of the element. In mathematics, this is also known as the Hermitian transpose of a matrix.
MATLAB provides two ways of calculating the complex conjugate transpose of a matrix:
- The ‘ operator.
- The ctranspose function.
Let us see the usage of both with examples.
Method 1: Using ‘ Operator:
Syntax:
vec_B = vec_A’
Example 1:
Matlab
vecA = [1+2i 3+3.1i 4-1i;
2-0.1i -4i 0.4;
1i 0.23-1i 23+31i];
disp( "Original Matrix" )
disp(vecA)
vecB = vecA';
disp( "Complex Conjugate Transpose of vecA" )
disp(vecB)
|
Output:
Method 2: Using ctranspose()
The ctranspose() function does the same job as the ‘ operator except the fact that it enables operator overloading for classes.
Matlab
vecA = [1+2i 3+3.1i 4-1i;
2-0.1i -4i 0.4;
1i 0.23-1i 23+31i];
disp( "Original Matrix" )
disp(vecA)
vecB = ctranspose(vecA);
disp( "ctranspose of vecA" )
disp(vecB)
|
Output:
It can be verified that both the methods give the exact same output.
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...