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

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

[Octave-bug-tracker] [bug #60748] lsode throws an unexpected and ill-fou


From: Kai Torben Ohlhus
Subject: [Octave-bug-tracker] [bug #60748] lsode throws an unexpected and ill-founded error
Date: Mon, 7 Jun 2021 21:32:25 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36

Update of bug #60748 (project octave):

                Priority:              5 - Normal => 3 - Low                
              Item Group: Unexpected Error or Warning => Documentation        
 
                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 
        Operating System:       Microsoft Windows => Any                    

    _______________________________________________________

Follow-up Comment #2:

Thanks for reporting this issue.

In your example, you are working with row instead of column vectors (see the
example in the manual
https://octave.org/doc/v6.2.0/Ordinary-Differential-Equations.html).

Your example rewritten:


x0=[1;0];
f=@(x,t) [-x(2);x(1)];%some vector function
slnf=lsode(f,x0,[0,pi]);%correct

g=@(x,t) circshift(x,1).*linspace(-1,1,length(x))';%strange but
xr=rand(2,1);
assert(g(xr)==f(xr)); %they are perfectly equal in 2D

slng=lsode(g,x0,[0,pi]); %no error


Regarding a better documentation of lsode, there is already bug #57508. 
Please contribute a nice ODE example there, that would have helped you and I
can add it to the manual 🙂

If there are any further issues, we can reopen this bug report.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60748>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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