MATLAB: Complex eigenvalues

complexeigenvaluematrix

Hi, I have a square symmetric matrix (5,5) with complex entries,the output eigenvalues when I use eig(T) are all complex .I want to determine the smallest negative eigenvalue.I don't know how ,any one can help.

Best Answer

"smallest" is not defined for complex numbers. "negative" is not defined for complex numbers either.
You can compare real parts, or you can compare imaginary parts, or you can compare magnitudes.
[vals, idx] = min(real(E));
E(idx)
or
[vals, idx] = min(imag(E));
E(idx)
or
[vals, idx] = min(abs(E));
E(idx)