Why does ode15s open a new windows command window for each iteration?

1 回表示 (過去 30 日間)
Adriaen
Adriaen 2014 年 9 月 30 日
コメント済み: Adriaen 2014 年 9 月 30 日
Hi
I'm trying to solve a DAE system using ode15s. The system contains 6 differential and 10 algebraic residual equations. I know that my initial values are close to the correct values. But when I try to run my script, MATLAB opens a new windows command window for each iteration (C:\Windows\sys32\cmd.exe). The only thing displayed in the command window is my current path (in this case M:\Documents\MATLAB\) The iteration is painfully slow. How can I solve this problem?
Thanks in advance
EDIT: The same problem occurs when trying to solve the system at steady state, i.e. when using fsolve to solve g(x) = 0. So my guess is that the problem is related to solving the implicit algebraic equations.

採用された回答

Sean de Wolski
Sean de Wolski 2014 年 9 月 30 日
Ha! I was very worried when I first ran this.
Stepping through it, if you look at the end of line 230.
CPI2 = C1 + C2*TB*(C3 + C4*TB*(C5 + C6*TB));!
You have an exclamation point which is the operator that calls the command window. Simply remove this and you're all set.
  1 件のコメント
Adriaen
Adriaen 2014 年 9 月 30 日
That sneaky little exclamation point!
Thanks a lot, now I know what to look for next time I get this error!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by