[Top][All Lists]

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

[Octave-bug-tracker] [bug #53669] core ode45 takes too long adaptative s

From: anonymous
Subject: [Octave-bug-tracker] [bug #53669] core ode45 takes too long adaptative steps.
Date: Mon, 16 Apr 2018 13:14:39 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0


                 Summary: core ode45 takes too long adaptative steps.
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Mon 16 Apr 2018 05:14:38 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Inaccurate Result
                  Status: None
             Assigned to: None
         Originator Name: Jose Ignacio Royo Prieto
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.2
        Operating System: Any



The "native" core version of ode45 seems to take very long steps when

I tried the example of Van der Pol's oscillator as suggested in the
documentation of ode45.m and takes 57 steps. The phase portrait looks very

On the other hand, the package version takes some 180 steps and gives a nicely
"correct" smooth phase portrait.

The following script gives both graphs so you can compare.

I have got those results in both Octave 4.2.1 and 4.2.2, for Windows 7, Linux
Mint 18.3. In octave-online.net (current version is 4.2.1 there) only core
ode45 has been tested with same shown result.

The code: (I am uploading the script and the png result)

% This is Van der Pol's oscillator,
% the example offered by the documentation
% of ode45.m

fvdp = @(T,Y) [Y(2); (1 - Y(1)^2) * Y(2) - Y(1)];
[T,Y] = ode45 (fvdp, [0, 20], [2, 0]);

plot(Y(:,1),Y(:,2),'-o') % Phase portrait looks horrible
title('core ode45')

% Now, with the "old" C:\Octave\OCTAVE~1.2\share\octave\packages\odepkg-0.8.5
pkg load odepkg

[T,Y] = ode45 (fvdp, [0, 20], [2, 0]);
plot(Y(:,1),Y(:,2),'-o') % Plase portrait looks good.
title('ode45 from odepkg-0.8.5 package')

print comparison.png


File Attachments:

Date: Mon 16 Apr 2018 05:14:38 PM UTC  Name: odexample.m  Size: 560B   By:

Date: Mon 16 Apr 2018 05:14:38 PM UTC  Name: comparison.png  Size: 24KiB   By:



Reply to this item at:


  Message sent via/by Savannah

reply via email to

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