MATLAB: Syntax error on simulink

simulinksyntax error on simulink

I am getting an error in simulink in a Fcn block:
m*(u(1) – l*u(3)*u(3)*sin(u(2)) + l*u(4)*cos(u(2)))
Can someone help urgently. Thanks in advance.

Best Answer

Simulink Fcn blocks give syntax errors if you name variables in them that are not variables that exist in the workspace.
I suspect that either m or I or both are not currently defined.
You might tend to think that Fcn blocks would wait until execution time to look for variables existing, but if I recall correctly, they parse the string at block initialization time
Related Question