Effacer les filtres
Effacer les filtres

syntax error in Simulink Fcn Block Expression

1 vue (au cours des 30 derniers jours)
Hormesis
Hormesis le 7 Nov 2017
Commenté : Walter Roberson le 13 Août 2023
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.

Réponses (2)

Walter Roberson
Walter Roberson le 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 )

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

Connectez-vous pour commenter.

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by