Syntax error in simulink
22 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Quamar Niyaz
el 20 de Jul. de 2016
Editada: Quamar Niyaz
el 20 de Jul. de 2016
Shoanaliy Arul
el 12 de Nov. de 2020
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
Respuestas (2)
Mark McBroom
el 14 de Nov. de 2020
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 comentario
Mark McBroom
el 14 de Nov. de 2020
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
el 14 de Sept. de 2024 a las 15:49
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 comentarios
Ver también
Categorías
Más información sobre Event Functions 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!