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

1 次查看(过去 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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by