syntax error in Simulink Fcn Block Expression
22 views (last 30 days)
Show older comments
I am getting a syntax error in Simulink in a Fcn block:
3*u(2)*l1^4*m1^2 + 36*u(1)*l1^2*m1 + 48*u(1)*l2^2*m2 + 30*u(2)*l1^2*l2^2*m2^2 + 36*Rp1*u(2)*l1^2*m1 + 48*Rp1*u(2)*l2^2*m2 + 36*u(2)*l1^4*m1*m2 + 4*u(2)*l1^2*l2^2*m1*m2 - 24*u(5)^2*l1*l2^3*m2^2*sin(u(3) - u(4)) - 18*u(2)*l1^2*l2^2*m2^2*cos(2*u(3) - 2*u(4)) - 18*u(2)^2*l1^2*l2^2*m2^2*sin(2*u(3) - 2*u(4)) + 24*u(2)*u(5)*l1*l2^3*m2^2*sin(u(3) - u(4)) - 18*u(5)^2*l1^3*l2*m1*m2*sin(u(3) - u(4)) + 72*Rp2*u(2)*l1*l2*m2*cos(u(3) - u(4)) - 72*Rp2*u(5)*l1*l2*m2*cos(u(3) - u(4)) + 18*u(2)*u(5)*l1^2*l2^2*m2^2*sin(2*u(3) - 2*u(4)) + 18*u(2)*u(5)*l1^3*l2*m1*m2*sin(u(3) - u(4)))/(l1^2*(3*l1^2*m1^2 + 30*l2^2*m2^2 + 36*l1^2*m1*m2 + 4*l2^2*m1*m2 - 18*l2^2*m2^2*cos(2*u(3) - 2*u(4)))
I really can't find the problem in this so a little help is appreciated.
0 Comments
Answers (2)
Walter Roberson
on 7 Nov 2017
Just before the / you have a ) that is not matched by an ( . If you had intended the entire expression left of the / to be the numerator, then you need to add a ( at the beginning.
The part after the / is missing a )
0 Comments
Mao Rothdamrong
on 13 Aug 2023
error in Simulink in a Fcn block. What can I do?
2 Comments
Sam Chak
on 13 Aug 2023
What exactly did the error message say? Also show the math expression.
Please open a new question if this is not directly related to the OP.
Walter Roberson
on 13 Aug 2023
We will need more information -- such as the expression that you are using
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!