help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave ode45 vs. Matlab ode45


From: Jeff
Subject: Re: Octave ode45 vs. Matlab ode45
Date: Fri, 14 Jun 2013 16:30:03 -0400

Yes, it looks like you're right. I tried changing the call to 
[t, u1] = ode45(@(t,y) f(t,y,beta), [0,T], [u0; v0], options);

Now I'm getting the messages
warning: Option "InitialStep" not set, new value 100.000000 is used
warning: Option "MaxStep" not set, new value 100.000000 is used

I would expect the initial time to be the "InitialStep", but I guess not. But when I add
options=odeset(options,'InitialStep',0);

to the initialization, it fails to run with this message
error: Solving has not been successful. The iterative integration loop exited at time t = 0.000000 before endpoint at tend = 1000.000000 was reached. This may happen if the stepsize grows smaller than defined in vminstepsize. Try to reduce the value of "InitialStep" and/or "MaxStep" with the command "odeset".

What's going on now?




On Fri, Jun 14, 2013 at 3:44 PM, Torsten <address@hidden> wrote:
On 14.06.2013 21:22, Jeffrey wrote:
> I'm getting different results from Octave's ode45 than from Matlab's. I
> also need to vary ode45's tolerance level, but I'm getting the following
> messages:
>
> warning: Option "RelTol" will be ignored if fixed time stamps are given
> warning: Option "AbsTol" will be ignored if fixed time stamps are given
>
> What do these messages mean? How do I properly set the tolerance? The
> documentation I can find indicates that 'time stamps' have to do with the
> time stamps of my source files. So not related to ode solving.
>
> Here is how I set the tolerance:
> tol=1e-8;
> options=odeset('Stats','on');
> options=odeset(options,'AbsTol',tol);
> options=odeset(options,'RelTol',tol);
> [t,u1]=ode45(@(t,y) f(t,y,beta), t; [u0;v0], options);
>

I guess "time stamps" means that you have a vector of time instances as
time parameter t instead of an interval ([t_begin, t_end]). In the
latter case, ode45 can chose the grid points in order to match the
tolerances. For a time vector, this grid is fixed.

Torsten




reply via email to

[Prev in Thread] Current Thread [Next in Thread]