Mon 20 Apr 2015 12:23:35 PM UTC, comment #6:
Thank you for such a quick response to this!
|
Fri 17 Apr 2015 10:04:08 PM UTC, comment #5:
I checked in a changeset here that uses stricter input validation of the OPT argument (http://hg.savannah.gnu.org/hgweb/octave/rev/93b3757a9623). It also updates the documentation. This will be a part of the 4.0 release coming out shortly.
|
Fri 17 Apr 2015 08:05:32 PM UTC, comment #4:
+verbose+
>> besselj (1, i, 3.0)
Error using besselj
SCALE must be 0 or 1.
-verbose-
Thanks for your fast response. This change will also necessitate a documentation update for the bessel functions. Should I open a separate issue for that?
|
Fri 17 Apr 2015 07:52:26 PM UTC, comment #3:
One final test I need data on.
I've got a changeset that works for this.
|
Fri 17 Apr 2015 06:59:52 PM UTC, comment #2:
|
Fri 17 Apr 2015 06:40:50 PM UTC, comment #1:
Do you have access to Matlab? I'd like to know how much input validation they are really doing.
Example Code to Run:
Post the results back to this bug report and I'll have a go at changing Octave.
|
Fri 17 Apr 2015 05:34:55 PM UTC, original submission:
besselj, bessely, besseli, besselk, and besselh all have an "opt" parameter, which if present causes the bessel* functions to return a scaled value. This is true whether "opt" has the value 0, 1, 'hokuspokus', or anything.
Attached is a small script which demonstrates besselj getting scaled by providing "opt" values of 0, 1, and 'hokuspokus'.
It would make more sense for this to be implemented the way it is in MATLAB so that "opt" must be a 0 or a 1. If 0, don't scale; if 1, scale.
|