1 ## Copyright (C) 1996-2012 John W. Eaton
3 ## This file is part of Octave.
5 ## Octave is free software; you can redistribute it and/or modify it
6 ## under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 3 of the License, or (at
8 ## your option) any later version.
10 ## Octave is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with Octave; see the file COPYING. If not, see
17 ## <http://www.gnu.org/licenses/>.
20 ## @deftypefn {Loadable Function} {[@var{j}, @var{ierr}] =} besselj (@var{alpha}, @var{x}, @var{opt})
21 ## @deftypefnx {Loadable Function} {[@var{y}, @var{ierr}] =} bessely (@var{alpha}, @var{x}, @var{opt})
22 ## @deftypefnx {Loadable Function} {[@var{i}, @var{ierr}] =} besseli (@var{alpha}, @var{x}, @var{opt})
23 ## @deftypefnx {Loadable Function} {[@var{k}, @var{ierr}] =} besselk (@var{alpha}, @var{x}, @var{opt})
24 ## @deftypefnx {Loadable Function} {[@var{h}, @var{ierr}] =} besselh (@var{alpha}, @var{k}, @var{x}, @var{opt})
25 ## Compute Bessel or Hankel functions of various kinds:
29 ## Bessel functions of the first kind. If the argument @var{opt} is supplied,
30 ## the result is multiplied by @code{exp(-abs(imag(x)))}.
33 ## Bessel functions of the second kind. If the argument @var{opt} is supplied,
34 ## the result is multiplied by @code{exp(-abs(imag(x)))}.
37 ## Modified Bessel functions of the first kind. If the argument @var{opt} is
39 ## the result is multiplied by @code{exp(-abs(real(x)))}.
42 ## Modified Bessel functions of the second kind. If the argument @var{opt} is
44 ## the result is multiplied by @code{exp(x)}.
47 ## Compute Hankel functions of the first (@var{k} = 1) or second (@var{k}
48 ## = 2) kind. If the argument @var{opt} is supplied, the result is multiplied
50 ## @code{exp (-I*@var{x})} for @var{k} = 1 or @code{exp (I*@var{x})} for
54 ## If @var{alpha} is a scalar, the result is the same size as @var{x}.
55 ## If @var{x} is a scalar, the result is the same size as @var{alpha}.
56 ## If @var{alpha} is a row vector and @var{x} is a column vector, the
57 ## result is a matrix with @code{length (@var{x})} rows and
58 ## @code{length (@var{alpha})} columns. Otherwise, @var{alpha} and
59 ## @var{x} must conform and the result will be the same size.
61 ## The value of @var{alpha} must be real. The value of @var{x} may be
64 ## If requested, @var{ierr} contains the following status information
65 ## and is the same size as the result.
72 ## Input error, return @code{NaN}.
75 ## Overflow, return @code{Inf}.
78 ## Loss of significance by argument reduction results in less than
79 ## half of machine accuracy.
82 ## Complete loss of significance by argument reduction, return @code{NaN}.
85 ## Error---no computation, algorithm termination condition not met,
91 error ("bessel: you must use besselj, bessely, besseli, or besselk");