Use a different method for symmetric matrices:
Construct real-valued matrices for testing:
For the non-symmetric matrix
m, the function just uses Gaussian elimination:
For the symmetric indefinite matrix
mi, the function tries the Cholesky method first:
For the symmetric positive definite matrix
mp, the function succeeds with the Cholesky method:
Determine if a sparse matrix is structurally symmetric: