help-octave
[Top][All Lists]

## Besseli Function

 From: John W. Eaton Subject: Besseli Function Date: Mon, 8 Sep 2003 11:33:19 -0500

```On  8-Sep-2003, Jose Otavio Bueno <address@hidden> wrote:

| I'm having problems with the Besseli Functions in Octave. While with
| Mathlab it is possible to solve the besseli functions with values up to
| 700, with Octave the function returns a valid answer just for input
| values below 81:

Octave allows you to ask to have the result from besseli scaled by
exp(-abs(x)).  So you can write

exp (abs (x)) * besseli (0, x, true);

(the last argument to besseli can be anything, its presence just means
"scale the result").  By doing this, Octave returns

octave:1> x = [1,10,81,82,700];
octave:2> exp(x).*besseli (0, x, true)
ans =

1.2661e+00    2.8157e+03    6.6864e+33    1.8064e+34   1.5296e+302

It might be useful if Octave detected the overflow (the internal
function zbesi provides that information) and then attempted to
providing a patch for that?

Also, the documentation for the scaling option could be better, so a
patch for that would also be appreciated.

Thanks,

jwe

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

```