|
From: | Sebastian Schöps |
Subject: | Re: substitute for ode23s |
Date: | Fri, 04 Jun 2010 15:09:22 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.4) Gecko/20100526 Thunderbird/3.1 |
Am 01.06.10 17:46, schrieb harsh_uict:
I had a similar problem while trying to integrate an ode with ode2r instead of ode15s of matlab. With tspan = [T0 T1 ... TEND] octave gave an error error: invalid conversion from real matrix to real scalar followed by a bunch of errors error: octave_base_value::array_value(): wrong type argument `<unknown type>' But when i changed tspan to tspan = [T0 TEND] the errors disappeared. May have some thing to do with the way ode2r is defined, though I am not sure. Hope this works for you too. Harsh
Do you want fixed step sizes for your time integration or are you asking how to get the values at times T0, T1, ... TEND?
If you want a time integration with a single fixed time step (h=T1-T0=T2-T1=...), then
h=T1=T0 tspan = [T0 TEND] odeset('MaxStep',h) [...] = ode2r(...) will do the trick.In the second case you might need to adjust RelTol and AbsTol and then do an interpolation to get your data.
Bye Sebastian
[Prev in Thread] | Current Thread | [Next in Thread] |