% % this file compares the model results with the real results % figure scale = 180/pi; scale = 1.0; [m_ts,m_x1s]= stairs(m_time,m_x1*scale); [ts,x1s] = stairs(time,x1*scale); [m_ts,m_x1ds]= stairs(m_time,m_x1_dot*scale); [ts,x1ds] = stairs(time,x1_dot*scale); subplot(2,1,1); hold on plot(m_ts,m_x1s,'-','Linewidth',1); plot(ts,x1s,'-','Linewidth',3); grid; legend('Model','Real'); ylabel('Position_1 (cm)'); % ylabel('Disk Position_1 (degrees)'); xlabel('Time (sec)'); hold off subplot(2,1,2); hold on plot(m_ts,m_x1ds,'-','Linewidth',1); plot(ts,x1ds,'-','Linewidth',3); grid; legend('Model','Real'); ylabel('Velocity_1 (cm/sec)'); % ylabel('Disk Velocity_1 (degrees/sec)'); xlabel('Time (sec)'); hold off