Error: File: puma560.m Line: 12 Column: 56 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
clear all
clc
syms theta1 theta2 theta3 theta4 theta5 theta6;
theta1=0.12;
theta2=0.24;
theta3=0;
theta4=0;
theta5=0;
theta6=0;
T1=[cos(theta1) -sin(theta1) 0 0;sin(theta1) cos(theta1)
0 0;0 0 0 1;0 0 0 1];
T2=[cos(theta2) -sin(theta2) 0 0;0 0 1 0;-sin(theta2) -
cos(theta2) 0 0;0 0 0 1];
T3=[cos(theta3) -sin(theta3) 0 0.43180;sin(theta3)
cos(theta3) 0 0;0 0 1 0.12446;0 0 0 1];
T4=[cos(theta4) -sin(theta4) 0 0.02032;0 0 1 0.43180;-
sin(theta4) -cos(theta4)0 0;0 0 0 1];
T5=[cos(theta5) -sin(theta5) 0 0;0 0 -1 0;sin(theta5)
cos(theta5) 0 0;0 0 0 1];
Respuestas (2)
Amir RF
el 10 de Dic. de 2020
In T1, T2, T3, and T4 you made a typo. If you want to continue the vector, equation,... you should use "..." at the end of each line. Also, for T4, you have to put an space between "-cos(theta4)" and "0".
T1=[cos(theta1) -sin(theta1) 0 0;sin(theta1) cos(theta1) ...
0 0;0 0 0 1;0 0 0 1];
T2=[cos(theta2) -sin(theta2) 0 0;0 0 1 0;-sin(theta2) - ...
cos(theta2) 0 0;0 0 0 1];
T3=[cos(theta3) -sin(theta3) 0 0.43180;sin(theta3) ...
cos(theta3) 0 0;0 0 1 0.12446;0 0 0 1];
T4=[cos(theta4) -sin(theta4) 0 0.02032;0 0 1 0.43180; ...
-sin(theta4) -cos(theta4) 0 0;0 0 0 1];
Best,
7 comentarios
Rik
el 10 de Dic. de 2020
Why don't you try using what Amir has showed you? This is basic Matlab syntax that will often need to use. Why don't you try learning from it, rather than waiting for someone else to make the edits for you?
balakrishna Gudapati
el 10 de Dic. de 2020
3 comentarios
Rik
el 10 de Dic. de 2020
Have a read here and here. It will greatly improve your chances of getting an answer. You can find guidelines for posting homework on this forum here. If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks). If your main issue is with understanding the underlying concept, you may consider re-reading the material you teacher provided and ask them for further clarification.
Ver también
Categorías
Más información sobre Scope Variables and Generate Names en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!