7017
|
1 ## Copyright (C) 1996, 1997, 1999, 2000, 2005, 2007 John W. Eaton |
3276
|
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 |
7016
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
|
8 ## your option) any later version. |
3276
|
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 |
7016
|
16 ## along with Octave; see the file COPYING. If not, see |
|
17 ## <http://www.gnu.org/licenses/>. |
3276
|
18 |
3321
|
19 ## -*- texinfo -*- |
7173
|
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 ## |
3321
|
27 ## @table @code |
|
28 ## @item besselj |
|
29 ## Bessel functions of the first kind. |
|
30 ## @item bessely |
|
31 ## Bessel functions of the second kind. |
|
32 ## @item besseli |
|
33 ## Modified Bessel functions of the first kind. |
|
34 ## @item besselk |
|
35 ## Modified Bessel functions of the second kind. |
7173
|
36 ## @item besselh |
|
37 ## Compute Hankel functions of the first (@var{k} = 1) or second (@var{k} |
|
38 ## = 2) kind. |
3321
|
39 ## @end table |
7173
|
40 ## |
|
41 ## If the argument @var{opt} is supplied, the result is scaled by the |
|
42 ## @code{exp (-I*@var{x})} for @var{k} = 1 or @code{exp (I*@var{x})} for |
|
43 ## @var{k} = 2. |
|
44 ## |
3321
|
45 ## If @var{alpha} is a scalar, the result is the same size as @var{x}. |
7173
|
46 ## If @var{x} is a scalar, the result is the same size as @var{alpha}. |
|
47 ## If @var{alpha} is a row vector and @var{x} is a column vector, the |
|
48 ## result is a matrix with @code{length (@var{x})} rows and |
|
49 ## @code{length (@var{alpha})} columns. Otherwise, @var{alpha} and |
|
50 ## @var{x} must conform and the result will be the same size. |
|
51 ## |
|
52 ## The value of @var{alpha} must be real. The value of @var{x} may be |
|
53 ## complex. |
|
54 ## |
|
55 ## If requested, @var{ierr} contains the following status information |
|
56 ## and is the same size as the result. |
|
57 ## |
|
58 ## @enumerate 0 |
|
59 ## @item |
|
60 ## Normal return. |
|
61 ## @item |
|
62 ## Input error, return @code{NaN}. |
|
63 ## @item |
|
64 ## Overflow, return @code{Inf}. |
|
65 ## @item |
|
66 ## Loss of significance by argument reduction results in less than |
|
67 ## half of machine accuracy. |
|
68 ## @item |
|
69 ## Complete loss of significance by argument reduction, return @code{NaN}. |
|
70 ## @item |
|
71 ## Error---no computation, algorithm termination condition not met, |
|
72 ## return @code{NaN}. |
|
73 ## @end enumerate |
3321
|
74 ## @end deftypefn |
3276
|
75 |
|
76 function bessel () |
|
77 error ("bessel: you must use besselj, bessely, besseli, or besselk"); |
|
78 endfunction |
3321
|
79 |