bugGNU Octave - Bugs: bug #55578, ode15s doesn't accept extra...

 
 

bug #55578: ode15s doesn't accept extra arguments to pass to function

Submitter:  Marshall <marsian>
Submitted:  Sat 26 Jan 2019 12:36:00 AM UTC
   
 
Category:  Octave Function Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Wont Fix Assigned to:  None
Originator Name:  Marsian Open/Closed:  * Closed
Release:  * 4.4.1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 27 Jan 2019 04:38:03 AM UTC, comment #2: 

I agree.  It is neither documented in Matlab, nor is it supported by the other built-in ODE solver lsode() in Octave.  The workaround, as Carlos suggests, is to use anonymous functions.

Rik <rik5>
Group administrator
Sat 26 Jan 2019 08:29:28 PM UTC, comment #1: 



As far as I know, passing extra arguments is a deprecated and undocumented feature in Matlab.

The Matlab documentation also recommends using a anonymous functions or function handle to bind the extra parameters
of the function passed to the solver.

see here

I really don't think there is any good reason for us to support
this old syntax if TMW is abandoning it as well.

Did something in the Octave ode15s docs lead you to think that this would work? If so we should fix the docs, otherwise this is rather a feature request than a bug.

Carlo de Falco <cdf>
Group Member
Sat 26 Jan 2019 12:36:00 AM UTC, original submission:  

when evaluating ode15s, additional arguments passed in after other arguments causes an error:

 sys = ode15s(@fun,trange,initc,odeset(),sysparams{:});

The following work though (with same syntax with ode45 or alternate function handle:

sys = ode15s(@(t,y)fun(t,y,sysparams{:}),trange,initc,odeset());
sys = ode45(@fun,trange,initc,odeset(),sysparams{:});



Marshall <marsian>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 marsian (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-27 rik5 Open/ClosedOpen Closed
    2019-01-26 cdf Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
        Item GroupUnexpected Error or Warning Feature Request
        StatusNone Wont Fix

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code