If eig(A)
cannot find the exact eigenvalues in terms of symbolic
numbers, it now returns the exact eigenvalues in terms of the root
function
instead. In previous releases, eig(A)
returns the eigenvalues as
floating-point numbers.
For example, compute the eigenvalues of a 5-by-5 symbolic matrix. The
eig
function returns the exact eigenvalues in terms of the
root
function. This is consistent with the results returned by the
solve
or root
function when solving for the roots of a
polynomial.
lambda =
root(z^5 - 100*z^4 + 134*z^3 + 66537*z^2 - 450198*z - 1294704, z, 1)
root(z^5 - 100*z^4 + 134*z^3 + 66537*z^2 - 450198*z - 1294704, z, 2)
root(z^5 - 100*z^4 + 134*z^3 + 66537*z^2 - 450198*z - 1294704, z, 3)
root(z^5 - 100*z^4 + 134*z^3 + 66537*z^2 - 450198*z - 1294704, z, 4)
root(z^5 - 100*z^4 + 134*z^3 + 66537*z^2 - 450198*z - 1294704, z, 5)
Use vpa
to numerically approximate the eigenvalues.
lambdaVpa =
-2.181032364984695108354692701065
9.8395828502812312578803604206392
-25.131641669799891607267584639192
26.341617610275869035465716505806
91.131473574227486422276200413812