clear
close

fig=figure('Units','inches','Position',[0.0 0.0 8.5 11.0]...
,'PaperUnits','inches','PaperPosition',[0.0 0.0 8.5 11.0]);

load out_dat;
n=size(out_dat,1)

for i=1:n,
 t(i)=out_dat(i,1);
 x(i)=out_dat(i,2);
 y(i)=out_dat(i,3);
 z(i)=out_dat(i,4);
end
amax(1)=max(abs(x))
amax(2)=max(abs(y))
amax(3)=max(abs(z))
amx=max(amax)*1.1
tmx=max(t)

subplot(3,1,1)
plot(t,x)
axis([0 tmx -amx amx])
title('Velocity X, Y, and Z Components')
ylabel('Velocity_X (cm/s)')
xlabel('time (sec)')

subplot(3,1,2)
plot(t,y)
axis([0 tmx -amx amx])
ylabel('Velocity_Y (cm/s)')
xlabel('time (sec)')

subplot(3,1,3)
plot(t,z)
axis([0 tmx -amx amx])
ylabel('Velocity_Z (cm/s)')
xlabel('time (sec)')

print p.ps
