bugGNU Octave - Bugs: bug #47756, [ode suit] integrate_adaptive...


bug #47756: [ode suit] integrate_adaptive fails with vertical tspan

Submitted by:  Juan Pablo Carbajal <juanpi>
Submitted on:  Thu 21 Apr 2016 07:12:39 PM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  juanpi Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 15 Jul 2016 10:02:36 PM UTC, comment #4: 

I pushed Juan's patch (http://hg.savannah.gnu.org/hgweb/octave/rev/46ce9eb019a6) after testing that integrate_n_steps and integrate_const didn't need a fix as well.  Closing report.

Rik <rik5>
Project Administrator
Tue 12 Jul 2016 04:58:46 PM UTC, comment #3: 

Assuming we just go with the original patch, do the other two private integrate functions (integrate_const, integrate_n_steps) also need the same change?

Rik <rik5>
Project Administrator
Thu 07 Jul 2016 08:28:33 AM UTC, comment #2: 

The patch works fine for me too.

The other possibility would be to transpose the
's' vector inside 'hermite_quartic_interpolation'

Both ways seems reasonable to me

Jacopo Corno <jcorno>
Thu 07 Jul 2016 06:48:45 AM UTC, comment #1: 


Did you review this patch?

It does fix the problem for me but
is it the correct aproach?


Carlo de Falco <cdf>
Project Member
Thu 21 Apr 2016 07:12:39 PM UTC, original submission:  

When tspan is an array of vertical timestamps integrate_adaptive.m fails when attempting hermite interpolation, due to the size of the argument tspan(t_caught).


pf   = [-0, -50, 0.25, 0.5, 0.65];
func =@(t,x) pf(1) * x(:) + pf(2) * (x(:) - pf(3)) .* (x(:) - pf(4)) .* (x(:) - pf(5));
opt  = odeset ('RelTol', 1e-6, ...
                'AbsTol', 1e-6, ...
                'InitialStep', 1e-3, ...
                'MaxStep', t(end) / 10);

t      = linspace (0,1,100).';
[t_ y] = ode45 (func, t, (-1:0.5:1).', opt);

The patch attached should fix the problem

Juan Pablo Carbajal <juanpi>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #36976:  integrate_adaptive.patch added by juanpi (843B - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by lachlan (Updated the item)
  • -email is unavailable- added by cdf
  • -email is unavailable- added by cdf
  • -email is unavailable- added by juanpi (took care of porting from forge)
  • -email is unavailable- added by juanpi (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-15 rik5 StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2016-06-29 lachlan StatusNone => Patch Submitted
    2016-04-27 cdf Carbon-Copy- => Added francesco.faccio@mail.polimi.it
    2016-04-27 cdf Carbon-Copy- => Added jacopo.corno@gmail.com
    2016-04-26 juanpi Carbon-Copy- => Added carlo.defalco@gmail.com
    2016-04-21 juanpi Attached File- => Added integrate_adaptive.patch, #36976

    Back to the top

    Powered by Savane 3.7