Mercurial > octave
annotate scripts/help/bessel.m @ 26376:00f796120a6d stable
maint: Update copyright dates in all source files.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 02 Jan 2019 16:32:43 -0500 |
parents | d7ad543255c5 |
children | b442ec6dda5c |
rev | line source |
---|---|
26376
00f796120a6d
maint: Update copyright dates in all source files.
John W. Eaton <jwe@octave.org>
parents:
25106
diff
changeset
|
1 ## Copyright (C) 1996-2019 John W. Eaton |
3276 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
5 ## Octave is free software: you can redistribute it and/or modify it |
3276 | 6 ## under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
7 ## the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
8 ## (at 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 | |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
13 ## GNU General Public License for more details. |
3276 | 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 |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
17 ## <https://www.gnu.org/licenses/>. |
3276 | 18 |
3321 | 19 ## -*- texinfo -*- |
24594
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
20 ## @deftypefn {} {[@var{J}, @var{ierr}] =} besselj (@var{alpha}, @var{x}, @var{opt}) |
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
21 ## @deftypefnx {} {[@var{Y}, @var{ierr}] =} bessely (@var{alpha}, @var{x}, @var{opt}) |
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
22 ## @deftypefnx {} {[@var{I}, @var{ierr}] =} besseli (@var{alpha}, @var{x}, @var{opt}) |
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
23 ## @deftypefnx {} {[@var{K}, @var{ierr}] =} besselk (@var{alpha}, @var{x}, @var{opt}) |
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
24 ## @deftypefnx {} {[@var{H}, @var{ierr}] =} besselh (@var{alpha}, @var{k}, @var{x}, @var{opt}) |
25106
d7ad543255c5
doc: Shorten very long first sentences of docstrings (bug #53388).
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
25 ## Compute Bessel or Hankel functions of various kinds. |
d7ad543255c5
doc: Shorten very long first sentences of docstrings (bug #53388).
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
26 ## |
d7ad543255c5
doc: Shorten very long first sentences of docstrings (bug #53388).
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
27 ## All functions begin with the prefix @qcode{"bessel"}. The list of |
d7ad543255c5
doc: Shorten very long first sentences of docstrings (bug #53388).
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
28 ## functions is: |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
29 ## |
3321 | 30 ## @table @code |
31 ## @item besselj | |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
32 ## Bessel functions of the first kind. If the argument @var{opt} is supplied, |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14363
diff
changeset
|
33 ## the result is multiplied by @code{exp (-abs (imag (x)))}. |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
34 ## |
3321 | 35 ## @item bessely |
9051
1bf0ce0930be
Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
36 ## Bessel functions of the second kind. If the argument @var{opt} is supplied, |
19102
bb20384acf7b
doc: Overhaul documentation for some functions in specfun/ dir.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
37 ## the result is multiplied by @w{@code{exp (-abs (imag (x)))}}. |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
38 ## |
3321 | 39 ## @item besseli |
10793
be55736a0783
Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents:
9245
diff
changeset
|
40 ## Modified Bessel functions of the first kind. If the argument @var{opt} is |
19102
bb20384acf7b
doc: Overhaul documentation for some functions in specfun/ dir.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
41 ## supplied, the result is multiplied by @w{@code{exp (-abs (real (x)))}}. |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
42 ## |
3321 | 43 ## @item besselk |
10793
be55736a0783
Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents:
9245
diff
changeset
|
44 ## Modified Bessel functions of the second kind. If the argument @var{opt} is |
19102
bb20384acf7b
doc: Overhaul documentation for some functions in specfun/ dir.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
45 ## supplied, the result is multiplied by @w{@code{exp (x)}}. |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
46 ## |
7173 | 47 ## @item besselh |
19102
bb20384acf7b
doc: Overhaul documentation for some functions in specfun/ dir.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
48 ## Compute Hankel functions of the first (@var{k} = 1) or second (@var{k} = 2) |
bb20384acf7b
doc: Overhaul documentation for some functions in specfun/ dir.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
49 ## kind. If the argument @var{opt} is supplied, the result is multiplied by |
bb20384acf7b
doc: Overhaul documentation for some functions in specfun/ dir.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
50 ## @w{@code{exp (-I*@var{x})}} for @var{k} = 1 or @w{@code{exp (I*@var{x})}} |
bb20384acf7b
doc: Overhaul documentation for some functions in specfun/ dir.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
51 ## for @var{k} = 2. |
3321 | 52 ## @end table |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
53 ## |
24594
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
54 ## If @var{alpha} is a scalar, the result is the same size as @var{x}. If |
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
55 ## @var{x} is a scalar, the result is the same size as @var{alpha}. If |
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
56 ## @var{alpha} is a row vector and @var{x} is a column vector, the result is |
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
57 ## a matrix with @code{length (@var{x})} rows and @code{length |
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
58 ## (@var{alpha})} columns. Otherwise, @var{alpha} and @var{x} must conform |
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
59 ## and the result will be the same size. |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
60 ## |
24594
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
61 ## The order of the Bessel function @var{alpha} must be real. The points for |
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
62 ## evaluation @var{x} may be complex. |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
63 ## |
19102
bb20384acf7b
doc: Overhaul documentation for some functions in specfun/ dir.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
64 ## If requested, @var{ierr} contains the following status information and is |
bb20384acf7b
doc: Overhaul documentation for some functions in specfun/ dir.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
65 ## the same size as the result. |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
66 ## |
7173 | 67 ## @enumerate 0 |
68 ## @item | |
69 ## Normal return. | |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
70 ## |
7173 | 71 ## @item |
72 ## Input error, return @code{NaN}. | |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
73 ## |
7173 | 74 ## @item |
75 ## Overflow, return @code{Inf}. | |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
76 ## |
7173 | 77 ## @item |
19102
bb20384acf7b
doc: Overhaul documentation for some functions in specfun/ dir.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
78 ## Loss of significance by argument reduction results in less than half of |
bb20384acf7b
doc: Overhaul documentation for some functions in specfun/ dir.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
79 ## machine accuracy. |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
80 ## |
7173 | 81 ## @item |
24906
451f4f291f46
Modified Bessel functions to compute the output with any input
Michele Ginesi <michele.ginesi@gmail.com>
parents:
24594
diff
changeset
|
82 ## Loss of significance by argument reduction, output may be inaccurate. |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
83 ## |
7173 | 84 ## @item |
24594
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
85 ## Error---no computation, algorithm termination condition not met, return |
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
86 ## @code{NaN}. |
7173 | 87 ## @end enumerate |
24594
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
88 ## |
a81af57f6144
doc: Redo documentation of Bessel functions.
Rik <rik@octave.org>
parents:
24534
diff
changeset
|
89 ## @seealso{besselj, bessely, besseli, besselk, besselh} |
3321 | 90 ## @end deftypefn |
3276 | 91 |
92 function bessel () | |
19835
7239100e8570
bessel.m: Suppress useless backtrace from error() when help file called as fcn.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
93 error ("bessel: you must use besselj, bessely, besseli, besselk, or besselh\n"); |
3276 | 94 endfunction |
3321 | 95 |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
96 |
12815
918610ea2f34
codesprint: new tests for specfun directory
John W. Eaton <jwe@octave.org>
parents:
11587
diff
changeset
|
97 %!error bessel () |