Syntax error in Simulink

조회 수: 5 (최근 30일)
Sebastian
Sebastian 2014년 1월 17일
답변: Kamlesh GUPTA 2023년 6월 9일
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.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 1월 17일
편집: Azzi Abdelmalek 2014년 1월 17일
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
Sebastian
Sebastian 2014년 1월 17일
Thank you, you were right, I used too many unnecessary brackets.
Ragul E
Ragul E 2023년 4월 12일
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

댓글을 달려면 로그인하십시오.

추가 답변 (3개)

Cristina Avilez
Cristina Avilez 2016년 6월 5일
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
Azzi Abdelmalek
Azzi Abdelmalek 2016년 6월 5일
편집: Azzi Abdelmalek 2016년 6월 5일
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"

댓글을 달려면 로그인하십시오.


Muhammad Umar Mubashir
Muhammad Umar Mubashir 2023년 2월 5일
@Cristina Avilez
I am facing same issue.
How did you resolve this error?
Please help me. Thanks.

Kamlesh GUPTA
Kamlesh GUPTA 2023년 6월 9일
(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.

카테고리

Help CenterFile Exchange에서 Libraries and Blocksets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by