%
%  this routine compares the predicted response with the real response
%
figure;
scale = 1; 
%scale = 180/pi; 

subplot(2,1,1)
hold on
plot(time,x1*scale,'-','Linewidth',1);
plot(m_time,m_x1*scale,':','Linewidth',4);
grid; 
legend('Measured','Predicted');
axis([0 min(max(m_time),max(time)) min(min(x1*scale),min(m_x1*scale)) max(max(x1*scale),max(m_x1*scale))]);
xlabel('Time (sec)');
ylabel('x_1 (cm)');
%ylabel('Displacement (deg)');
hold off

subplot(2,1,2)
hold on
plot(time,x2*scale,'-','Linewidth',1);
plot(m_time,m_x2*scale,':','Linewidth',4);
grid; 
legend('Measured','Predicted');
axis([0 min(max(m_time),max(time)) min(min(x1*scale),min(m_x2*scale)) max(max(x1*scale),max(m_x2*scale))]);
xlabel('Time (sec)');
ylabel('x_2 (cm)');
%ylabel('Displacement (deg)');
hold off