Borrar filtros
Borrar filtros

syntax error in Simulink Fcn Block Expression

1 visualización (últimos 30 días)
Hormesis
Hormesis el 7 de Nov. de 2017
Comentada: Walter Roberson el 13 de Ag. de 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.

Respuestas (2)

Walter Roberson
Walter Roberson el 7 de Nov. de 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 el 13 de Ag. de 2023
error in Simulink in a Fcn block. What can I do?
  2 comentarios
Sam Chak
Sam Chak el 13 de Ag. de 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 el 13 de Ag. de 2023
We will need more information -- such as the expression that you are using

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by