I am getting a syntax error in Simulink in a Fcn block:
((u(2)*(u(3))^2)/12)-((u(2)*u(3))^2)/8)*((1-2*(u(1)/u(3)))-(1/3)*(1-2*(u(1)/u(3)))^3)
I really can't find the problem in this so a little help is appreciated.

 Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 17 Jan. 2014
Bearbeitet: Azzi Abdelmalek am 17 Jan. 2014

1 Stimme

You have a problem with brackets
(u(2)*u(3)^2)/12-((u(2)*u(3))^2)/8*(1-2*u(1)/u(3))-(1/3)*(1-2*u(1)/u(3))^3

2 Kommentare

Sebastian
Sebastian am 17 Jan. 2014
Thank you, you were right, I used too many unnecessary brackets.
Ragul E
Ragul E am 12 Apr. 2023
c1*(c2/u(2)-c3*u(3)-c4)*(exp-c5/u(2))+c6*u(1)
same problem tried solving it by reducing brackets but didn't work

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (3)

Cristina Avilez
Cristina Avilez am 5 Jun. 2016

0 Stimmen

The expression: m*(u(1)-l*sin(u(3))*(u(2)^2)+l*u(4)*cos(u(3))) in 'Pendulo_1/Sistema_dinamico/N' has a syntax error
But I don't know where the problem is, someone can help me, please.

1 Kommentar

Azzi Abdelmalek
Azzi Abdelmalek am 5 Jun. 2016
Bearbeitet: Azzi Abdelmalek am 5 Jun. 2016
Cristina, Have you noticed that your comment is considered as an answer? If you want to ask question, delete this comment, then go to the section "Ask a question"

Melden Sie sich an, um zu kommentieren.

Muhammad Umar Mubashir
Muhammad Umar Mubashir am 5 Feb. 2023

0 Stimmen

@Cristina Avilez
I am facing same issue.
How did you resolve this error?
Please help me. Thanks.
Kamlesh GUPTA
Kamlesh GUPTA am 9 Jun. 2023

0 Stimmen

(c1*(c2/u(2)-c3*u(3)-c4))*(exp(-c5/u(2))+c6*u(10)
I am getting a syntax error in Simulink in a Fcn block:
How did you resolve this error?
Please help me. Thanks.

Kategorien

Mehr zu Modeling finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by