Codigo PR2
Codigo PR2
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';