
l=dir('*.csv');

 for i=6:size(l,1)
    [TIME,DATE1,HDNG,BATT,VX,VY,VZ,TX,TY,VN,VE,VU] = importfile1(l(i).name, 13, 50013);
 DN=datenum(strcat(DATE1(2:end),',',TIME(2:end)));
   VelSqt=sqrt(medfilt1(VX(2:end)).^2+medfilt1(VY(2:end)).^2);
figure;
plot(DN,VelSqt,'bx');
datetick('x','mm/dd/yy','keepticks','keeplimits');
pause(30)
save l(1).name;
close all; 

end


DN=datenum(strcat(DATE1(2:end),',',TIME(2:end)));
VelSqt=sqrt(medfilt1(VX(2:end)).^2+medfilt1(VY(2:end)).^2);

figure;
plot(DN(1:10000),VelSqt(1:10000),'bx');hold on;
plot(DN(1:10000),VY(1:10000),'ro');
plot(DN(1:10000),medfilt1(VX(1:10000)),'c*');
legend('Magnitude','Vx','MedFilt');
 
 

 
 
 

figure;
plot(DN(1:10000),VX(1:10000),'x');
datetick('x','HH:MM, mm/yy','keepticks','keeplimits');
 
figure;
plot(DN(10000:20000),VX(10000:20000),'x');
datetick('x','HH:MM, mm/yy','keepticks','keeplimits');
figure;
plot(DN,VX,'x');
datetick('x','HH:MM, mm/yy','keepticks','keeplimits');

figure;
plot(DN,VelSqt,'bx');
datetick('x','mm/dd/yy','keepticks','keeplimits');

for r=1: