444 E Programs of Chapter 6: Analytical Dynamics
% diff(’q2(t)’,t) -> dq2n
% ’q1(t)’ -> q1n
% ’q2(t)’ -> q1n
T01zt = subs(T01zc, ql, qn);
T12zt = subs(T12zc, ql, qn);
% ezplot(f,[min,max]) plots f(t)
% over the domain: min<t<max
subplot(2,1,1), ezplot(T01zt,[0,Tp]),...
xlabel(’t (s)’), ylabel(’T01z (N m)’),...
title(’’), grid,...
subplot(2,1,2),ezplot(T12zt,[0,Tp]),...
xlabel(’t (s)’), ylabel(’T12z (N m)’),...
title(’’), grid
% % another way of plotting T01z and T12z
%
% time = 0:1:Tp;
% T01t = subs(T01zt,’t’,time);
% T12t = subs(T12zt,’t’,time);
% subplot(2,1,1),plot(time,T01t),...
% xlabel(’t (s)’),ylabel(’T01z (N m)’),grid,...
% subplot(2,1,2),plot(time,T12t),...
% xlabel(’t (s)’),ylabel(’T12z (N m)’),grid
%
% q_1t = subs(q1n,’t’,time);
% q_2t = subs(q2n,’t’,time);
%
% subplot(2,1,1),plot(time,q_1t
*
180/pi),...
% xlabel(’t (s)’),ylabel(’q1 (deg)’),grid,...
%
% subplot(2,1,2),plot(time,q_2t
*
180/pi),...
% xlabel(’t (s)’),ylabel(’q2 (deg)’),grid
% end of program
E.3 RRT Robot Arm
%E3
% Analytical Dynamics
% RRT robot arm