Wed 06 Sep 2017 04:09:18 PM UTC, comment #10:
Thanks for the review. I changed the text in this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/3d65720cd68a).
|
Wed 06 Sep 2017 03:26:30 PM UTC, comment #9:
@Rik: in the second testif you added in ode15s.m (or, last line of ode15s.m) YP0 should be replaced by Y0.
|
Tue 05 Sep 2017 06:50:11 PM UTC, comment #8:
@Marco: I committed a modified version of your patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/6e7bb85e32b8). I decided not to rename y0 and yp0 since those are the names that Matlab uses and many users may be familiar with them.
Thus, the change was principally to check_default_input which now validates y0 and yp0 more carefully, and then transforms them to column vectors.
Perhaps you could pull and then run
and see if everything still passes. I don't have SUNDIALS so these tests are all skipped on my computer.
|
Thu 09 Feb 2017 10:37:55 AM UTC, comment #7:
The new patch for check_default_input.m now checks for nonnumeric or nonvector init or initp and transform them into columns. I changed y0 into init and y0p into initp everywhere (or should I have changed init into y0 in both ode45 and ode23?). I added tests for initial row vectors (now allowed) and nonvector initial values (an initial value as a square matrix produces a segfault, without this patch).
Should be ode23 and ode45 modified in order to use check_dafault_input?
(file #39709)
|
Wed 08 Feb 2017 05:25:14 PM UTC, comment #6:
Good point, I will modify the patch.
|
Wed 08 Feb 2017 04:42:17 PM UTC, comment #5:
This time the patch uploaded correctly. I have a question, would it not be better to check that the initial conditions are vectors, and then force them to be column vectors? This is what is doen in ode23.m as shown below:
The current patch changes private/check_default_input.m
This will allow matrices through because they will be turned into column vectors, when in fact the user has probably made some mistake by using a matrix as input.
|
Wed 08 Feb 2017 07:47:24 AM UTC, comment #4:
I try again to upload the patch.
(file #39702)
|
Wed 08 Feb 2017 05:18:55 AM UTC, comment #3:
I'm unable to download the patch you attached. This might be something wrong with Savannah, or it might be that your upload was corrupted. Could you try putting the file on Savannah again?
|
Sun 05 Feb 2017 05:20:08 PM UTC, comment #2:
Done. I allowed ode15i to work with both y0 and y0p row vectors, as written in the documentation, although the following
does not work in Matlab R2014b.
Moreover, in all the integrators I see a sentence like
This is true, but it is true also if @var{init} is a column vector.
(file #39673)
|
Sun 05 Feb 2017 03:37:55 PM UTC, comment #1:
Can you prepare a cset for this with a few BIST tests? The solution seems quite simple.
|
Tue 31 Jan 2017 10:15:12 AM UTC, original submission:
The following code
does not work, while it works in Matlab and works in Octave with ode23 and ode45 instead of ode15s. I guess it is enough to change y0 to y0(:) around lines 56 and 59 of check_default_input.m (probably the same with yp0).
|