syntax error in Simulink Fcn Block Expression

1 次查看(过去 30 天)
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.

回答(2 个)

Walter Roberson
Walter Roberson 2017-11-7
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 )

Mao Rothdamrong
Mao Rothdamrong 2023-8-13
error in Simulink in a Fcn block. What can I do?
  2 个评论
Sam Chak
Sam Chak 2023-8-13
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
Walter Roberson 2023-8-13
We will need more information -- such as the expression that you are using

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by