Conjugate transpose: Difference between revisions

Content added Content deleted
(+Stata)
Line 2,738: Line 2,738:
printCplxMat(cplxMatMul(U, conjTransp(U)));
printCplxMat(cplxMatMul(U, conjTransp(U)));
print();</lang>
print();</lang>

=={{header|Stata}}==
In Mata, the ' operator is always the conjugate transpose. To get only the matrix transpose without complex conjugate, use the [ transposeonly] function.

<lang stata>
: a=1,2i\3i,4

: a
1 2
+-----------+
1 | 1 2i |
2 | 3i 4 |
+-----------+

: a'
1 2
+-------------+
1 | 1 -3i |
2 | -2i 4 |
+-------------+

: transposeonly(a)
1 2
+-----------+
1 | 1 3i |
2 | 2i 4 |
+-----------+

: a*a'
[Hermitian]
1 2
+-------------+
1 | 5 |
2 | -5i 25 |
+-------------+

: a*a'==a'*a
0

: a'==a
0

: a'*a==I(rows(a))
0
</lang>


=={{header|Tcl}}==
=={{header|Tcl}}==