]> Creatis software - CreaPhase.git/blob - octave_packages/m/specfun/bessel.m
update packages
[CreaPhase.git] / octave_packages / m / specfun / bessel.m
1 ## Copyright (C) 1996-2012 John W. Eaton
2 ##
3 ## This file is part of Octave.
4 ##
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.
9 ##
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.
14 ##
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/>.
18
19 ## -*- texinfo -*-
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:
26 ##
27 ## @table @code
28 ## @item besselj
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)))}.
31 ##
32 ## @item bessely
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)))}.
35 ##
36 ## @item besseli
37 ## Modified Bessel functions of the first kind.  If the argument @var{opt} is
38 ## supplied,
39 ## the result is multiplied by @code{exp(-abs(real(x)))}.
40 ##
41 ## @item besselk
42 ## Modified Bessel functions of the second kind.  If the argument @var{opt} is
43 ## supplied,
44 ## the result is multiplied by @code{exp(x)}.
45 ##
46 ## @item besselh
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
49 ## by
50 ## @code{exp (-I*@var{x})} for @var{k} = 1 or @code{exp (I*@var{x})} for
51 ## @var{k} = 2.
52 ## @end table
53 ##
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.
60 ##
61 ## The value of @var{alpha} must be real.  The value of @var{x} may be
62 ## complex.
63 ##
64 ## If requested, @var{ierr} contains the following status information
65 ## and is the same size as the result.
66 ##
67 ## @enumerate 0
68 ## @item
69 ## Normal return.
70 ##
71 ## @item
72 ## Input error, return @code{NaN}.
73 ##
74 ## @item
75 ## Overflow, return @code{Inf}.
76 ##
77 ## @item
78 ## Loss of significance by argument reduction results in less than
79 ## half of machine accuracy.
80 ##
81 ## @item
82 ## Complete loss of significance by argument reduction, return @code{NaN}.
83 ##
84 ## @item
85 ## Error---no computation, algorithm termination condition not met,
86 ## return @code{NaN}.
87 ## @end enumerate
88 ## @end deftypefn
89
90 function bessel ()
91   error ("bessel: you must use besselj, bessely, besseli, or besselk");
92 endfunction
93
94 %!error bessel ()