disp(' ');
disp(' eigenvalue.m   ver 1.4   September 24, 2012');
disp(' By Tom Irvine  Email: tomirvine@aol.com');
disp('  ');
%
disp(' Select input method ');
disp('  1=mass & stiffness matrices ');
disp('  2=standardized stiffness matrix ');
im=input(' ');
%
clear K_999;   % number appended in case stiffness matrix is K
clear M_999;
clear fn;
clear omega;
clear ModeShapes;
clear MST;
%
if(im==1)
    disp(' Enter the name of the mass matrix ');
    M_999=input(' ');
    disp(' Enter the name of the stiffness matrix ');
    K_999=input(' ');  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
else
    disp(' Enter the name of the standardized matrix ');
    K_999=input(' ');
    n=max(size(K_999));
    M=eye(n,n);
end
disp(' ');
%
tic
if(im==1)
    [fn,omega,ModeShapes,MST]=Generalized_Eigen(K_999,M_999,3);
else
    [fn,omega,ModeShapes,MST]=Standard_Eigen(K_999,3);   
end
toc
%
disp(' ');
disp(' Display Mode Shapes?  1=yes  2=no ');
ish=input(' ');
if(ish==1)
    ModeShapes
end
%
if(im==2)
    disp(' ');
    disp(' Note that a transformation would be required to ');
    disp(' to calculate the correct mode shapes for the ');
    disp(' corresponding generalized eigenvalue problem. ');
end
%
disp(' ');
disp(' Save ModeShapes & fn to binary?  1=yes 2=no ');
isb=input(' ');
if(isb==1)
    disp(' ');
    disp(' Enter filename with *.mat extension. ');
    bin_filename = input(' ','s');
    mass=M_999;
    stiff=K_999;
    save(bin_filename,'mass','stiff','ModeShapes','fn','-mat');
end