Timeline for Choice of step size using ODEs in matlab
Current License: CC BY-SA 3.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 20, 2013 at 22:56 | comment | added | Stefano M | In the answer to the follow-up question it turns out that $0.1$ is a dimensional quantity with dimensions $1/\text{time}$. Maybe more consistent results are obtained with $\frac{\alpha}{\Delta t} \cdot (N_t - N_0)$ where $\Delta t$ is the time step? | |
Jun 18, 2013 at 18:18 | vote | accept | CommunityBot | ||
Jun 18, 2013 at 18:14 | answer | added | user4388 | timeline score: 1 | |
Jun 18, 2013 at 18:11 | history | edited | user4388 | CC BY-SA 3.0 |
added 970 characters in body
|
May 27, 2013 at 9:29 | history | edited | user4388 | CC BY-SA 3.0 |
added 363 characters in body
|
May 24, 2013 at 22:30 | answer | added | Nico Schlömer | timeline score: 2 | |
May 24, 2013 at 21:48 | answer | added | Bill Greene | timeline score: 4 | |
May 24, 2013 at 20:02 | history | tweeted | twitter.com/#!/StackSciComp/status/338022110976954368 | ||
May 24, 2013 at 15:57 | comment | added | David Ketcheson | The answer is just to use a local error estimate. There is one built in to ODE45, so the easiest thing is to use that, but you could alternatively code up your own. | |
May 24, 2013 at 13:34 | comment | added | J. M. |
If memory serves, there should be an option in ode45() that would allow you to retain steps bigger than a certain threshold; you might want to look into that.
|
|
May 24, 2013 at 13:29 | comment | added | user4388 | Hmm...this could be the problem. The origin of these fixed steps was that somewhere I needed to re-normalize the number of particles before they would all decay away. But maybe I can do this by putting the normalization in odefun and use the "giant time vector". Also, the input $y$ into the ode45 is 4*129*129 numbers. I was afraid if I didn't use time steps I wouldn't have enough memory. | |
May 24, 2013 at 13:17 | review | First posts | |||
May 24, 2013 at 15:20 | |||||
May 24, 2013 at 13:05 | comment | added | J. M. |
The fundamental problem is that you're forcibly using an adaptive method like ode45() to take equispaced steps. Why, precisely, are you avoiding the generation of the "giant vector"? If you absolutely need equispaced points, have ode45() proceed as usual, and then use interpolation.
|
|
May 24, 2013 at 13:01 | history | asked | user4388 | CC BY-SA 3.0 |