	function sm = StabMode(F,TAS,ROM,LonLD,SBA,DIM)
%	Stability and Modes of Motion
%	=============================
%   July 5, 2023
	sm	=	1;
    [Eigenvectors,EigenvalueMatrix]	=	eig(F);

    disp('EIGENVALUES along Diagonal')
    disp('==========================')
    EigenvalueMatrix
	disp('==========================')
    disp('  ')
    disp('EIGENVECTORS in Same Order as EIGENVALUES = MODAL MATRIX')
    disp('========================================================')
    Eigenvectors
	kv	=	length(F);
    
    EVA =   [];
	for k = 1:kv		% Eigenvector Amplitudes
		a	=	Eigenvectors(:,k);
		Magnitude	        =	real(sqrt(ctranspose(a) * a));
		EvectorAmplitude	=	sqrt(a .* conj(a)) / Magnitude;
        EVA =   [EVA, EvectorAmplitude];
    end
    disp('========================================================')
	disp('  ')
	disp('EIGENVECTOR Amplitudes')
	disp('======================')
    EVA
	disp('======================')
    
    if DIM == 4
	    disp('VELOCITY-WEIGHTED EIGENVECTOR Amplitudes')
        disp('for 4th-Order Body-Axis Model')
        disp('========================================')
        EVAW    =   [];
	    for k = 1:4    % Velocity-Weighted Eigenvector Amplitudes
		    if LonLD =='Lon'	% LONGITUDINAL Model
		        a	=	[a(1:2)/TAS;a(3:4)];					
		    end			

		    if LonLD =='LaD'	% LATERL-DIRECTIONAL Model
		        a	=	[a(1)/TAS;a(2:4)];					
            end

		    Magnitude	=	real(sqrt(ctranspose(a) * a));
		    EvectorAmplitude	=	sqrt(a .* conj(a)) / Magnitude;
            EVAW =   [EVAW, EvectorAmplitude];
        end
        EVAW
    disp('========================================')
    end

