Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CD 2gdl GraficaROBOT3
CD 2gdl GraficaROBOT3
m
%Cierra ventanas y limpia variables
close all
clc
clear all
Pgina 1
CD_2gdl_graficaROBOT3.m
% Grfica del espacio de trabajo
figure('Name','Espacio de trabajo','NumberTitle','off')
th5=0:(pi/2)/20:2*pi;%th5=th1
th6=0*th5;%th6=th2
px3=L1*cos(th5)+L2*cos(th5+th6);
py3=L1*sin(th5)+L2*sin(th5+th6);
plot(px3,py3,'Linewidth',3)
grid
xlabel('Eje x')
ylabel('Eje y')
m3=max(max(th5));
m4=m3*180/pi;
n3=max(max(th6));
n4=n3*180/pi;
title(['\theta_1 = ',num2str(m4),' \theta_2 = ',num2str(n4),'' ])
axis equal
% figure()
% for th9=0:(pi/2)/20:2*pi;
% th10=0:(pi/2)/20:2*pi;
% px5=L1*cos(th9)+L2*cos(th9+th10);
% py5=L1*sin(th9)+L2*sin(th9+th10);
% plot(px5,py5,'r','Linewidth',2)
% end
Pgina 2