From: Janelle on 14 Oct 2009 10:13 In some cases, when I call the ode45 function the dialog box will read 'busy', the solution is never found, and no error messages are produced. Any idea as to what sort of problem this implies? Is it possible that the system cannot be solved with the initial conditions that I am providing? Thanks in advance for any help, Janelle
From: Steven Lord on 16 Oct 2009 17:26 "Janelle " <jmessmer(a)vt.edu> wrote in message news:hb4ma0$cc1$1(a)fred.mathworks.com... > In some cases, when I call the ode45 function the dialog box will read > 'busy', the solution is never found, and no error messages are produced. > > Any idea as to what sort of problem this implies? > > Is it possible that the system cannot be solved with the initial > conditions that I am providing? As a first guess, I suspect that either: 1) You've written your ODE function incorrectly, so that it gets trapped in an infinite loop or something, or 2) Your system of ODEs is stiff. For case 1, you'll need to debug your code and make sure you're not doing something involving recursion or an infinite loop that your ODE function can't break out of. For case 2, use a stiffer solver. The reference page for ODE45 (doc ode45) will show you which solvers are suitable for stiff problems. The May 2003 Cleve's Corner article has more information about stiffness in the context of ODEs; you may want to read it for additional information. http://www.mathworks.com/company/newsletters/news_notes/clevescorner/ -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|
Pages: 1 Prev: help debug my program. Next: how to write the order of defcx in mincx |