You can verify a matrix is symmetric or not by comparing it with its transpose. If the original matrix A is symmetric, then A = A'
should be true.
Here's the code to check a matrix is symmetric in MATLAB:
main.m139 chars5 lines
To use this function, call isMatrixSymmetric(A)
with your matrix A as an argument. The function will return true
if the matrix is symmetric, and false
otherwise.
gistlibby LogSnag