Mercurial > octave-libtiff
changeset 28044:ace8dc642e4d
ode15i.m, ode15s.m: Fix handling of Mass & Jacobian options in cset 5e44268dca6f.
* ode15i.m: Don't check for Jacobian being a function handle (it can also be a
cell array).
* ode15s.m: Check for Mass and Jacobian options possibly given as numeric
matrices.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 04 Feb 2020 16:29:37 -0800 |
parents | 711cf9b1be49 |
children | 13dba3c069f8 |
files | scripts/ode/ode15i.m scripts/ode/ode15s.m |
diffstat | 2 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ode/ode15i.m Tue Feb 04 15:48:27 2020 -0800 +++ b/scripts/ode/ode15i.m Tue Feb 04 16:29:37 2020 -0800 @@ -123,10 +123,6 @@ endif options.Jacobian = str2func (options.Jacobian); endif - if (! is_function_handle (options.Jacobian)) - error ("Octave:invalid-input-arg", - [solver ": invalid value assigned to field 'Jacobian'"]); - endif endif if (! isempty (options.OutputFcn))
--- a/scripts/ode/ode15s.m Tue Feb 04 15:48:27 2020 -0800 +++ b/scripts/ode/ode15s.m Tue Feb 04 16:29:37 2020 -0800 @@ -117,7 +117,7 @@ endif options.Mass = str2func (options.Mass); endif - if (! is_function_handle (options.Mass)) + if (! is_function_handle (options.Mass) && ! isnumeric (options.Mass)) error ("Octave:invalid-input-arg", [solver ": invalid value assigned to field 'Mass'"]); endif @@ -131,7 +131,8 @@ endif options.Jacobian = str2func (options.Jacobian); endif - if (! is_function_handle (options.Jacobian)) + if (! is_function_handle (options.Jacobian) + && ! isnumeric (options.Jacobian)) error ("Octave:invalid-input-arg", [solver ": invalid value assigned to field 'Jacobian'"]); endif