Syntax error in simulink
조회 수: 14 (최근 30일)
이전 댓글 표시
Getting syntax error in Simulink for this expression
m*(u(1)-l*u(3)*u(3)*sin(u(2))+l*u(4)*cos(u(2)))
The equation seems correct. Can anyone explain it?
댓글 수: 6
Shoanaliy Arul
2020년 11월 12일
I am also getting the simular error.
Mine says:
The expression: m*(u(1) - l*u(3)*u(3)*sin(u(2)) + l*u(4)*cos(u(2))) in 'Pend_Model/Subsystem/N' has a syntax error
답변 (2개)
Mark McBroom
2020년 11월 14일
The following variables need to be defined in the MATLAB workspace:
I, g, b, m, l, M
thetadot is missing a paren. It hsould be:
1/I*(-u(1)*cos(u(3)) - u(2)*sin(u(3)))
댓글 수: 1
Mark McBroom
2020년 11월 14일
Note. I debugged this by cutting and pasting each of the equations into the MATLAB workspace. This gives more detailed info on undefined variables and syntax errors.
Diki
2024년 9월 14일
Error:The expression: (-1/(J/(R^2)+m))*(m*g*sin(u(3))-m*u(1)*(u(4)^2)
in 'RootLocus/Ball and Steam/Fcn'
has a syntax error
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 General Applications에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!