I have this problem whit plot3
Mostrar comentarios más antiguos
This is my code
%Robot RRP Planar
clear all;
close all;
clc
%Definir Variables Simbolicas
syms q1 q2 L1 L2 d3 deg
%------------------------------------------
%para hacerlo sin Offset Quitar los 90gradis de q1
A01 = matrizDH(q1,L1,0,90,deg) %Relaciona al Sistema 1 con respecto al sistema 0
A12 = matrizDH(q2,0,0,-90,deg) %Relaciona al Sistema 2 con respecto al sistema 1
A23 = matrizDH(0,L2+d3,0,0,deg) %Relaciona al Sistema 3 con respecto al sistema 2
%Matriz DH Final
A02 = A01*A12;
A03= A02*A23;
%------------------------------------------
%Evaluacion Numerica
f = 50;
q1v=deg2rad(linspace(0,20,f));
q1v=deg2rad(linspace(0,45,f));
L1 =2;
L2 =1;
d3 = 0.7;
A00 = eye(4,4);
A01e= eval(A01);
A02e= eval(A02);
A03e= eval(A03);
%------------------------------------------
%Posicion de Los Eslabones
X = [0,A01e(1,4),A02e(1,4),A03e(1,4)];
Y = [0,A01e(2,4),A02e(2,4),A03e(2,4)];
Z = [0,A01e(3,4),A02e(3,4),A03e(3,4)];
hold on
%------------------------------------------
%Grafica
plot3(X,Y,Z,'-k','linewidth',2)
hold on
plot3(X,Y,Z,'or','linewidth',2)
xlabel('X');xlabel('Y');xlabel('Z')
axis([-2 5 -2 5 -0 5])
view(3);grid on
trplot(A00,'frame','0','color','r')
trplot(A01e,'frame','1','color','b')
trplot(A02e,'frame','2','color','g')
trplot(A03e,'frame','3','color','c')
title('RRP')
Show de next Error
Error using plot3
Data must be numeric, datetime, duration or an array convertible to double.
Error in RobotRRP (line 37)
plot3(X,Y,Z,'-k','linewidth',2)
1 comentario
Ive J
el 22 de Mzo. de 2022
whos X Y Z % what do you get?
Respuestas (0)
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!