0% found this document useful (0 votes)
25 views

Codigo PR2

Uploaded by

Team series
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Codigo PR2

Uploaded by

Team series
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

for t= 1:3

for ith1= 1:length(theta1)


%x(t,ith1) = a1*cos(theta1(ith1)) + a2*cos(theta1(ith1)+
theta2_start_end(t))+a3*cos(theta1(ith1)+ theta2(ith1)+theta3_start_end(t));
%y(t,ith1) = a1*sin(theta1(ith1)) + a2*sin(theta1(ith1)+
theta2_start_end(t))+a3*sin(theta1(ith1)+ theta2(ith1)+theta3_start_end(t));
end

for ith2=1:length(theta2)
x(t+2,ith2) = a1*cos(theta1_start_end(t)) + a2*cos(theta1_start_end(t)+
theta2(ith2))+a3*cos(theta1_start_end(t)+theta2_start_end(t)+ theta3(ith2));
y(t+2,ith2) = a1*sin(theta1_start_end(t)) + a2*sin(theta1_start_end(t)+
theta2(ith2))+a3*sin(theta1_start_end(t)+theta2_start_end(t)+ theta3(ith2));
end
for ith3=1:length(theta3)
x(t+3,ith3) = a1*cos(theta1_start_end(t)) + a2*cos(theta1_start_end(t)+
theta2_start_end(t))+a3*cos(theta1_start_end(t)+ theta2_start_end(t)+theta3(ith3));
y(t+3,ith3) = a1*sin(theta1_start_end(t)) + a2*sin(theta1_start_end(t)+
theta2_start_end(t))+a3*sin(theta1_start_end(t)+ theta2_start_end(t)+theta3(ith3));
end

end

x=x';
y=y';

plot (x(:,1),y(:,1), 'k')


hold on
plot (x(:,2),y(:,2), 'm')
plot (x(:,3),y(:,3), 'r')
plot (x(:,4),y(:,4), 'b')
end

You might also like