%function [  ] = plotCPFdynamicsXYZ( data_NS, data_EW, data_D )

% Plot both the NS and EW and Down (D) data

% --------------------------------
% CPF Dynamics output plots:
% --------------------------------
% Row 1 --- Time (sec)
% Row 2 --- Current Velocity (m/s)
% Row 3 --- CPF Position (m)
% Row 4 --- CPF Velocity (m/s)
% Row 5 --- CPF Acceleration (m/s/s)
% Row 6 --- CPF Acceleration (mg)
% Row 7 --- Reynolds Number



figure(1), clf

        
 % Column 1
        subplot(3,2,1)
        plot(data_NS(:,1), data_NS(:,3),'b', data_EW(:,1), data_EW(:,3),'--g', data_D(:,1), data_D(:,3),'--r');
        xlabel('Time [sec]');
        ylabel('CPF Position [m]');
        legend('North/South', 'East/West', 'Verticle', 'Location', 'southeast');
        
        
        subplot(3,2,3)
        plot(data_NS(:,1), data_NS(:,4),'b',data_EW(:,1), data_EW(:,4),'--g', data_D(:,1), data_D(:,4),'--r');
        xlabel('Time [sec]');
        ylabel('CPF Velocity [m/s]');
        legend('North/South', 'East/West','Verticle', 'Location', 'southeast');

        
        
        subplot(3,2,5)
        plot(data_NS(:,1), data_NS(:,5),'b',data_EW(:,1), data_EW(:,5),'--g', data_D(:,1), data_D(:,5),'--r');
        xlabel('Time [sec]');
        ylabel('CPF Acceleration [m/s/s]');
        legend('North/South', 'East/West','Verticle', 'Location', 'southeast');
       

        
        
% Column 2     
        subplot(3,2,2)
        plot(data_NS(:,1), data_NS(:,7),'b',data_EW(:,1), data_EW(:,7),'--g', data_D(:,1), data_D(:,7),'--r');
        xlabel('Time [sec]');
        ylabel('Reynolds Number');
        legend('North/South', 'East/West','Verticle', 'Location', 'southeast');

        
        
        subplot(3,2,4)
        plot(data_NS(:,1), data_NS(:,2),'b',data_EW(:,1), data_EW(:,2),'--g', data_D(:,1), data_D(:,2),'--r');
        xlabel('Time [sec]');
        ylabel('Current Velocity [m/s]');
        legend('North/South', 'East/West', 'Verticle', 'Location', 'southeast');

        
        subplot(3,2,6)
        plot(data_NS(:,1), data_NS(:,6),'b',data_EW(:,1), data_EW(:,6),'--g', data_D(:,1), data_D(:,6),'--r');
        xlabel('Time [sec]');
        ylabel('CPF Acceleration [mg]');
        legend('North/South', 'East/West', 'Verticle', 'Location', 'southeast');
       % axis([0 2500 -1 1])
       

       
 figure(2), clf
 
        subplot(3,1,1)
        plot(data_NS(:,1), data_NS(:,2),'k',data_NS(:,1), data_NS(:,4),'--b');
        xlabel('Time [sec]');
        ylabel('Velocity [m/s]');
        legend('Current Velocity North/South', 'CPF Velocity North/South','Location', 'southeast');
        
        subplot(3,1,2)
        plot(data_EW(:,1), data_EW(:,2),'k',data_EW(:,1), data_EW(:,4),'--g');
        xlabel('Time [sec]');
        ylabel('Velocity [m/s]');
        legend('Current Velocity East/West', 'CPF Velocity East/West','Location', 'southeast');
        
        subplot(3,1,3)
        plot(data_D(:,1), data_D(:,2),'k',data_D(:,1), data_D(:,4),'--r');
        xlabel('Time [sec]');
        ylabel('Velocity [m/s]');
        legend('Programmed Velocity +Z', 'CPF Velocity +Z','Location', 'southeast');

        
        
        
        
%end
