ishermitian
Hermitian matrix test.
Syntax
R = ishermitian(A)
R = ishermitian(A,tol)
Inputs
- A
- The variable to test.
- tol
- The tolerance for the test (default 0).
Outputs
- R
- A logical 1 when A is a hermitian matrix, and 0 otherwise.
Example
Matrix
example:
R = ishermitian([1,2+7i,3;2-7i,4,5;3,5,6])
R = 1
Comments
A Hermitian matrix is equal to its transposed complex conjugate.
tol applies as follows:
norm(A-A.','inf')/norm(A,'inf') tol.