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

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

[Octave-bug-tracker] [bug #49449] odeplot is not fully Matlab compatible


From: Rik
Subject: [Octave-bug-tracker] [bug #49449] odeplot is not fully Matlab compatible
Date: Wed, 26 Oct 2016 23:12:41 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Update of bug #49449 (project octave):

                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #4:

plot() isn't recommended, even in Matlab, for user-created OutputFcns.  See
https://www.mathworks.com/matlabcentral/newsreader/view_thread/296870.

The documentation for odeset
(http://www.mathworks.com/help/matlab/ref/odeset.html) and the OutputFcn
property says that 


The solver calls status = myOutputFcn(t,y,[]) after each integration step for
which output is requested. t contains points where output was generated during
the step, and y is the numerical solution at the points in t. If t is a
vector, then the ith column of y corresponds to the ith element of t.


So they are clear that when there are multiple times, y is a matrix with
numel(t) rows and with the number of columns equal to the number of equations
being solved.

It's easy enough to use all the points given as input rather than the first. 
I made that change on the development branch here
(http://hg.savannah.gnu.org/hgweb/octave/rev/7c45d565d1b7).  Interestingly,
this gets us bug-for-bug compatible with Matlab as there is the funny line
running back to the origin.  I also changed the marker to 'o' from '.' since
that is what I see in the pictures you posted.  It is 31% slower to use that
marker, but those are the breaks.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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