octave-bug-tracker
[Top][All Lists]

## [Octave-bug-tracker] [bug #49408] ode{23, 45} option "Refine" has no eff

 From: Rik Subject: [Octave-bug-tracker] [bug #49408] ode{23, 45} option "Refine" has no effect Date: Fri, 21 Oct 2016 22:33:14 +0000 (UTC) User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

```Update of bug #49408 (project octave):

Status:                    None => Confirmed

_______________________________________________________

Follow-up Comment #1:

Further clarification, the integrated function myfun is

myfun = @(t, y) 1;

With the Refine option set to 1, only the principal timesteps are calculated.
Under Matlab, the code below chooses just 4 time steps.

myfun = @(t, y) 1;
[t, y] = ode45 (myfun, [0 1], 1, odeset ('maxstep', 1, 'initialstep', .1,
'refine', 1));
t'
ans =
0    0.1000    0.6000    1.0000

When Refine is an integer N greater than 1 then N-1 intermediate timesteps are
calculated.  So, the three gaps between the principal timesteps should each
get 2 smaller timesteps.  This is indeed what happens under Matlab.

myfun = @(t, y) 1;
[t, y] = ode45 (myfun, [0 1], 1, odeset ('maxstep', 1, 'initialstep', .1,
'refine', 3));
t'
ans =
0    0.0333    0.0667    0.1000    0.2667    0.4333    0.6000
0.7333    0.8667    1.0000

Under Octave, the solver, without the Refine option, chooses 6 principal
timesteps.  I don't think this is an issue, just a difference from Matlab.
However, when the Refine option is used, Octave does not generate any
intermediate timesteps which is a problem.

_______________________________________________________

<http://savannah.gnu.org/bugs/?49408>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/

```