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 (최근 30일)
이전 댓글 표시
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];
답변 (2개)
Amir RF
2020년 12월 10일
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
Rik
2020년 12월 10일
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
2020년 12월 10일
댓글 수: 3
Rik
2020년 12월 10일
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Scope Variables and Generate Names에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!