Mon 24 Oct 2016 05:05:41 AM UTC, comment #5:
I pushed a cset that disables the Refine option when a sngle output is requested or when specific intermediate timesteps are given (http://hg.savannah.gnu.org/hgweb/octave/rev/04fc7e9c5f96). This is only a partial fix which will become important when the Refine option is actually implemented.

Sun 23 Oct 2016 09:48:33 PM UTC, comment #4:
According to Matlab documentation for odeset:
This merely confirms what the testing shows.

Sat 22 Oct 2016 08:56:47 PM UTC, comment #3:
Some experiments with Matlab show that 'Refine'
is ignored also in the following two cases
 only one output is requested (this case is related to bug #49417 )
 tspan has more than two entries
Matlab test for first case:
Matlab test for second case:

Sat 22 Oct 2016 06:20:56 AM UTC, comment #2:
Clarification about the different choice of principal timesteps.
With odefun set to
the ODE could be integrated exactly in only one step,
so the timestep size is grown by the maximum factor allowed
at each step.
In Octave the maximum factor is
while from the output of this test it appears to be set to 5 in Matlab.
A large value of facmax can help with very simple problems
but can lead to many timestep rejections in practical cases.
This is more of a problem in Octave than in Matlab because of JIT so it is fair for Octave to be more conservative.
Therefore the issue here is indeed only the missing refinement steps and not the timestep selection procedure.

Fri 21 Oct 2016 10:33:14 PM UTC, comment #1:
Further clarification, the integrated function myfun is
With the Refine option set to 1, only the principal timesteps are calculated. Under Matlab, the code below chooses just 4 time steps.
When Refine is an integer N greater than 1 then N1 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.
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.

Fri 21 Oct 2016 08:14:31 PM UTC, original submission:
consider the following test in Matlab 2016a:
the same code when run in Octave returns:
it seems that the intermediate steps are computed in integrate_adaptive
but not added to the output.
