Code covered by the BSD License  

Highlights from
Classical_Mechanics_with_Matlab_applications_JEH.zip

from Classical_Mechanics_with_Matlab_applications_JEH.zip by Javier Hasbun
Applications from the text: Classical Mechanics with Matlab applications by Javier E Hasbun, Jones &

eigen.m
%eigen.m
clear;
M=[[1,-1];[-1,1]]  %input matrix M
[P,L]=eig(M)       %eigen vectors, P, and eigenvalues, L
PI=inv(P)          %inverse of P
P*PI               %the unit matrix should result
PI*M*P             %check eigenvectors. Should get eigenvalues back

Contact us at files@mathworks.com