Syntax error in Simulink

14 ビュー (過去 30 日間)
Teo  Adrian
Teo Adrian 2020 年 11 月 21 日
編集済み: Teo Adrian 2020 年 11 月 21 日
It shows that The expression: (1/(75.31*u(4)+167.36*u(5)+217.57*u(6)+334.37*u(7))*(0.84*(u(3)-u(2))+41840*exp(20.9057-(10000/(u(2)+275.15)))*x*(3)*u(5)+25105*exp(38.9057-(17000/(u(2)+273.15)))*u(4)*u(6))) has a syntax error. I don't know why it is wrong. Can someone help me? This is my first order equations
(1/(75.31*x(3)+167.36*x(4)+217.57*x(5)+334.37*x(6))*(0.84*(x(2)-x(1))+41840*exp(20.9057-(10000/(x(1)+275.15)))*x*(3)*x(4)+25105*exp(38.9057-(17000/(x(1)+273.15)))*x(3)*x(5)))
(1.6/200)*(u(1)-x(2))-(0.42*2)/(200*4.2)*(x(2)-x(1))-(0.084*4)/(200*4.2)*(x(2)-17)
-exp(20.9057-(10000/(x(1)+273.15)))*x(3)*x(4)-exp(38.9057-(17000/(x(1)+273.15)))*x(3)*x(5)
-exp(20.9057-(10000/(x(1)+273.15)))*x(3)*x(4)
exp(20.9057-(10000/(x(1)+273.15)))*x(3)*x(4)-exp(38.9057-(17000/(x(1)+273.15)))*x(3)*x(5)
exp(38.9057-(17000/(x(1)+273.15)))*x(3)*x(5)

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2020 年 11 月 21 日
Define a set of example value for u(1) to u(7) in MATLAB, copy and past your expression picece by piece in small parts and execute it in MATLAB, find which part causing the problem.
  2 件のコメント
Teo  Adrian
Teo Adrian 2020 年 11 月 21 日
Actually I'm still newbie for this simulink. Can I pm u to ask?
Teo  Adrian
Teo Adrian 2020 年 11 月 21 日
This is my first order equation. If someone can help me to solve it, really thanks alot!
(1/(75.31*x(3)+167.36*x(4)+217.57*x(5)+334.37*x(6))*(0.84*(x(2)-x(1))+41840*exp(20.9057-(10000/(x(1)+275.15)))*x*(3)*x(4)+25105*exp(38.9057-(17000/(x(1)+273.15)))*x(3)*x(5)))
(1.6/200)*(u(1)-x(2))-(0.42*2)/(200*4.2)*(x(2)-x(1))-(0.084*4)/(200*4.2)*(x(2)-17)
-exp(20.9057-(10000/(x(1)+273.15)))*x(3)*x(4)-exp(38.9057-(17000/(x(1)+273.15)))*x(3)*x(5)
-exp(20.9057-(10000/(x(1)+273.15)))*x(3)*x(4)
exp(20.9057-(10000/(x(1)+273.15)))*x(3)*x(4)-exp(38.9057-(17000/(x(1)+273.15)))*x(3)*x(5)
exp(38.9057-(17000/(x(1)+273.15)))*x(3)*x(5)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by