% Jerry Pratt
% March 31, 2000
% Plotting speed variation for PhD thesis with Flamingo...

figure(1);clf;
subplot(3,3,1)
plot(t,vel+0.1);hold on;
axis([0,5,0.5,1.5]);
ylabel('Velocity (m/s)');
subplot(3,3,2)
plot(t,q_z);
axis([0,5,0.8,0.9]);
ylabel('Height (m)');
subplot(3,3,3)
plot(t,q_theta);
axis([0,5,-0.2,0.2]);
ylabel('Pitch (rad)');
subplot(3,3,4)
plot(t,right_state,'--');hold on;
plot(t,left_state);
axis([0,5,0,3]);
ylabel('State');
subplot(3,3,7)
plot(t,lh_pow);
axis([0,5,-60,60]);
ylabel('Left Hip Pow (W)');
xlabel('Time (seconds)');
subplot(3,3,8)
plot(t,lk_pow);
axis([0,5,-40,40]);
ylabel('Left Knee Pow (W)');
xlabel('Time (seconds)');
subplot(3,3,9)
plot(t,la_pow);
axis([0,5,-25,25]);
ylabel('Left Ankle Pow (W)');
xlabel('Time (seconds)');
subplot(3,3,5)
plot(t,q_lthigh); hold on;
plot(t,q_rthigh,'--');
axis([0,5,-1,1]);
ylabel('Thigh Angle (rad)');
subplot(3,3,6)
plot(t,q_lshin);hold on;
plot(t,q_rshin,'--');
axis([0,5,-1,1]);
ylabel('Shin Angle (rad)');

orient tall;
print -dill fast_short_stride_a.ai

start1 = 4.28;
stop1 = 4.95;

figure(2);clf;
subplot(5,2,1)
plot(t,q_lthigh);hold on;
plot(t,lthigh_d,'--');
axis([start1,stop1,-1.0,1.0]);
ylabel('Thigh Pos (rad)');
subplot(5,2,2)
plot(t,q_lshin);hold on;
plot(t,lshin_d,'--');
axis([start1,stop1,-1.0,1.0]);
ylabel('Shin Pos (rad)');
subplot(5,2,3)
plot(t,qd_lthigh);hold on;
plot(t,lthighd_d,'--');
axis([start1,stop1,-10.0,10.0]);
ylabel('Thigh Vel. (rad/s)');
subplot(5,2,4)
plot(t,qd_lshin);hold on;
plot(t,lshind_d,'--');
axis([start1,stop1,-10.0,10.0]);
ylabel('Shin Vel. (rad/s)');
subplot(5,2,5)
plot(t,lthighdd_d,'--');
axis([start1,stop1,-100.0,100.0]);
ylabel('Thigh Acc. (rad/s^2)');
subplot(5,2,6)
plot(t,lshindd_d,'--');
axis([start1,stop1,-100.0,100.0]);
ylabel('Shin Acc. (rad/s^2)');
subplot(5,2,7);
plot(t,tau_lh);
axis([start1,stop1,-20,20]);
ylabel('Hip Torque (Nm)');
subplot(5,2,8);
plot(t,tau_lk);
axis([start1,stop1,-10,10]);
ylabel('Knee Torque (Nm)');
subplot(5,2,9);
plot(t,lh_pow);
axis([start1,stop1,-60,60]);
ylabel('Hip Power (W)');
xlabel('Time (seconds)');
subplot(5,2,10);
plot(t,lk_pow);
axis([start1,stop1,-40,40]);
ylabel('Knee Power (W)');
xlabel('Time (seconds)');


orient tall;
print -dill fast_short_stride_b.ai

