1######################################################################## 2## 3## Copyright (C) 1996-2021 The Octave Project Developers 4## 5## See the file COPYRIGHT.md in the top-level directory of this 6## distribution or <https://octave.org/copyright/>. 7## 8## This file is part of Octave. 9## 10## Octave is free software: you can redistribute it and/or modify it 11## under the terms of the GNU General Public License as published by 12## the Free Software Foundation, either version 3 of the License, or 13## (at your option) any later version. 14## 15## Octave is distributed in the hope that it will be useful, but 16## WITHOUT ANY WARRANTY; without even the implied warranty of 17## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18## GNU General Public License for more details. 19## 20## You should have received a copy of the GNU General Public License 21## along with Octave; see the file COPYING. If not, see 22## <https://www.gnu.org/licenses/>. 23## 24######################################################################## 25 26## -*- texinfo -*- 27## @deftypefn {} {[@var{J}, @var{ierr}] =} besselj (@var{alpha}, @var{x}, @var{opt}) 28## @deftypefnx {} {[@var{Y}, @var{ierr}] =} bessely (@var{alpha}, @var{x}, @var{opt}) 29## @deftypefnx {} {[@var{I}, @var{ierr}] =} besseli (@var{alpha}, @var{x}, @var{opt}) 30## @deftypefnx {} {[@var{K}, @var{ierr}] =} besselk (@var{alpha}, @var{x}, @var{opt}) 31## @deftypefnx {} {[@var{H}, @var{ierr}] =} besselh (@var{alpha}, @var{k}, @var{x}, @var{opt}) 32## Compute Bessel or Hankel functions of various kinds. 33## 34## All functions begin with the prefix @qcode{"bessel"}. The list of 35## functions is: 36## 37## @table @code 38## @item besselj 39## Bessel functions of the first kind. If the argument @var{opt} is supplied, 40## the result is multiplied by @code{exp (-abs (imag (x)))}. 41## 42## @item bessely 43## Bessel functions of the second kind. If the argument @var{opt} is supplied, 44## the result is multiplied by @w{@code{exp (-abs (imag (x)))}}. 45## 46## @item besseli 47## Modified Bessel functions of the first kind. If the argument @var{opt} is 48## supplied, the result is multiplied by @w{@code{exp (-abs (real (x)))}}. 49## 50## @item besselk 51## Modified Bessel functions of the second kind. If the argument @var{opt} is 52## supplied, the result is multiplied by @w{@code{exp (x)}}. 53## 54## @item besselh 55## Compute Hankel functions of the first (@var{k} = 1) or second (@var{k} = 2) 56## kind. If the argument @var{opt} is supplied, the result is multiplied by 57## @w{@code{exp (-I*@var{x})}} for @var{k} = 1 or @w{@code{exp (I*@var{x})}} 58## for @var{k} = 2. 59## @end table 60## 61## If @var{alpha} is a scalar, the result is the same size as @var{x}. If 62## @var{x} is a scalar, the result is the same size as @var{alpha}. If 63## @var{alpha} is a row vector and @var{x} is a column vector, the result is 64## a matrix with @code{length (@var{x})} rows and @code{length 65## (@var{alpha})} columns. Otherwise, @var{alpha} and @var{x} must conform 66## and the result will be the same size. 67## 68## The order of the Bessel function @var{alpha} must be real. The points for 69## evaluation @var{x} may be complex. 70## 71## If requested, @var{ierr} contains the following status information and is 72## the same size as the result. 73## 74## @enumerate 0 75## @item 76## Normal return. 77## 78## @item 79## Input error, return @code{NaN}. 80## 81## @item 82## Overflow, return @code{Inf}. 83## 84## @item 85## Loss of significance by argument reduction results in less than half of 86## machine accuracy. 87## 88## @item 89## Loss of significance by argument reduction, output may be inaccurate. 90## 91## @item 92## Error---no computation, algorithm termination condition not met, return 93## @code{NaN}. 94## @end enumerate 95## 96## @seealso{besselj, bessely, besseli, besselk, besselh} 97## @end deftypefn 98 99function bessel () 100 error ("bessel: you must use besselj, bessely, besseli, besselk, or besselh\n"); 101endfunction 102 103 104%!error bessel () 105