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

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

[Octave-bug-tracker] [bug #60240] Jacobian for ode15s as matrix fails


From: Andreas Stahel
Subject: [Octave-bug-tracker] [bug #60240] Jacobian for ode15s as matrix fails
Date: Tue, 16 Mar 2021 06:04:04 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0

URL:
  <https://savannah.gnu.org/bugs/?60240>

                 Summary: Jacobian for ode15s as matrix fails
                 Project: GNU Octave
            Submitted by: andreasstahel
            Submitted on: Tue 16 Mar 2021 10:04:01 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: Andreas Stahel
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

When calling ode15s() with a Jacobian passed as function handle it works as
expected.
When the Jacobian is passed as matrix, it fails.


%% works well if Jacobian passed as function handle
opt = odeset ("RelTol", 1e-8, "AbsTol", 1e-6,'Jacobian',@(t,y)[98, 198;-99,
-199],'Stats','on');
%% does not return results of Jacobian passed as matrix
%opt = odeset ("RelTol", 1e-8, "AbsTol", 1e-6,'Jacobian',[98, 198;-99,
-199],'Stats','on');
f = @(t,y)[98, 198;-99, -199]*(y-[1;0]);
y_exact = @(t)2*exp(-t)-exp(-100*t)+1;

disp('results with Jacobian')
[t15sJ, y15sJ] = ode15s (f ,[0, 5],[2;0], opt);  y15sJ = y15sJ(:,1);




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 16 Mar 2021 10:04:01 AM UTC  Name: ODE15s_Question.m  Size: 981B  
By: andreasstahel

<http://savannah.gnu.org/bugs/download.php?file_id=51072>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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