disp(' '); disp(' principal_moi.m ver 1.0 Nov 30, 2009 '); disp(' by Tom Irvine Email: tomirvine@aol.com '); disp(' '); disp(' This script calculates the principal moments '); disp(' of inertia from a rotational inertia matrix'); disp(' '); % clear a; clear Irot; % a(1,1)=input(' Enter Ixx '); a(1,2)=input(' Enter Ixy '); a(1,3)=input(' Enter Ixz '); % disp(' '); a(2,1)=input(' Enter Iyx '); a(2,2)=input(' Enter Iyy '); a(2,3)=input(' Enter Iyz '); % disp(' '); a(3,1)=input(' Enter Izx '); a(3,2)=input(' Enter Izy '); a(3,3)=input(' Enter Izz '); % disp(' '); Irot=a % [PrincipalDirections PrincipalMoments]=eig(Irot) TraceIrot=trace(Irot) TracePM=trace(PrincipalMoments)