ode "Mass" and "Jacobian" options

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ode "Mass" and "Jacobian" options

Rik-4
The ode solver options "Mass" and "Jacobian" can be either a function
handle or a matrix according to odeset().  If it is a matrix, does that
mean a numeric 2-D matrix or just a numeric N-D array?

The input validation for ode15i and ode15s has to be re-done because of a
change in the behavior of str2func, and I'm taking the opportunity to
improve it.

Thanks,
Rik

Reply | Threaded
Open this post in threaded view
|

Re: ode "Mass" and "Jacobian" options

Bill Greene-3
If you are generally trying to improve  input validation for these functions, did you
look at bug #49871? This is something that has been screwed up since these
functions were introduced.

On Tue, Feb 4, 2020 at 5:26 PM Rik <[hidden email]> wrote:
The ode solver options "Mass" and "Jacobian" can be either a function
handle or a matrix according to odeset().  If it is a matrix, does that
mean a numeric 2-D matrix or just a numeric N-D array?

The input validation for ode15i and ode15s has to be re-done because of a
change in the behavior of str2func, and I'm taking the opportunity to
improve it.

Thanks,
Rik

Reply | Threaded
Open this post in threaded view
|

Re: ode "Mass" and "Jacobian" options

Rik-4
In reply to this post by Rik-4
On 02/04/2020 03:54 PM, Bill Greene wrote:
What is an "N-D array"? Do you mean 3 or more dimensions?

Yes, that is the general usage of N-D array in Octave documentation.

As far as I am aware, the Mass matrix must be a 2-D full or sparse matrix.

Okay.  Is the matrix also required to be real and square? 

Thanks,
Rik


On Tue, Feb 4, 2020 at 5:26 PM Rik <[hidden email]> wrote:
The ode solver options "Mass" and "Jacobian" can be either a function
handle or a matrix according to odeset().  If it is a matrix, does that
mean a numeric 2-D matrix or just a numeric N-D array?

The input validation for ode15i and ode15s has to be re-done because of a
change in the behavior of str2func, and I'm taking the opportunity to
improve it.

Thanks,
Rik


Reply | Threaded
Open this post in threaded view
|

Re: ode "Mass" and "Jacobian" options

Rik-4
In reply to this post by Bill Greene-3
On 02/04/2020 04:01 PM, Bill Greene wrote:
> If you are generally trying to improve  input validation for these
> functions, did you
> look at bug #49871? This is something that has been screwed up since these
> functions were introduced.

I'm working on some even more basic issues, but that bug report does look
worth fixing.

I'll post something there as well.

--Rik

Reply | Threaded
Open this post in threaded view
|

Re: ode "Mass" and "Jacobian" options

Bill Greene-3
In reply to this post by Rik-4
The matrix must be square. In matlab, it can be complex but since octave depends on
sundials there doesn't appear to be any easy way to support complex ODEs. So the octave
versions should  disallow complex.



On Tue, Feb 4, 2020 at 7:10 PM Rik <[hidden email]> wrote:
On 02/04/2020 03:54 PM, Bill Greene wrote:
What is an "N-D array"? Do you mean 3 or more dimensions?

Yes, that is the general usage of N-D array in Octave documentation.

As far as I am aware, the Mass matrix must be a 2-D full or sparse matrix.

Okay.  Is the matrix also required to be real and square? 

Thanks,
Rik


On Tue, Feb 4, 2020 at 5:26 PM Rik <[hidden email]> wrote:
The ode solver options "Mass" and "Jacobian" can be either a function
handle or a matrix according to odeset().  If it is a matrix, does that
mean a numeric 2-D matrix or just a numeric N-D array?

The input validation for ode15i and ode15s has to be re-done because of a
change in the behavior of str2func, and I'm taking the opportunity to
improve it.

Thanks,
Rik