% Numerical Mathematics and Computing, Fifth Edition % Ward Cheney & David Kincaid % Brooks/Cole Publ. Co. % (c) 2003 % % file: eig.m % eigenvalues of matrix A % via characteristic polynomial and directly A = [3 2; 7 -2] p = poly(A) roots(p) eig(A)