78
4 Bessel and Airy Functions
4.4
The SPECFUNPHYS-Class Bessel
MATLAB comes with the function besselj, bessely, besselh, besseli,
and besselk to evaluate the Bessel function J ν (z), Y ν (z), H
(1)
ν (z), H
(2)
ν (z), I ν (z),
and K ν (z). All of them have one single output, the corresponding function value.
With the exception of besselh the following inputs: the order ν which has to be
real and the position z which could be complex. The third optional input is either 0
for non-scaled or 1 for scaled outputs. The Bessel functions J ν (z), Y ν (z), H
(1)
ν (z),
and H
(2)
ν (z) are scaled with exp(−
1
2 |z−¯ z|), and I ν (z) and K ν (z) via exp(−
1
2 |z+¯ z|).
The only difference in this argument list is for besselh which comes with an
additional second input “k” equal to 1 or 2 to compute the Hankel function H
(k)
ν (z).
z and ν could be either equal in size, or one has to be a scaler value. Example: bj
= besselj(nu,z). More details can be found in the MATLAB documentation.
In contrast to MATLAB the SPECFUNPHYS-class bessel supports as well
complex orders. The syntax is [obj,result] = bessel(wh,nu,z), with
“wh” the information which function shall be evaluated. A complete list can be
found in Table 4.2. The order “nu” could be a complex array and the function
argument “z” as well. “nu” and “z” have to be either of the same size, or one has to
be a scalar. For spherical Bessel functions “nu” should be an integer and for Kelvin
functions “z” real and positive, due to the definition of these two function types.
(Numerically there is no reason for these restrictions.)
The class bessel allows two name-value pairs as additional optional input
[obj, result] = bessel(wh, nu, z, name, value): for name
‘ML’ value ‘yes’ or ‘no’ (default). With “yes” the corresponding MATLAB function
for Bessel and modified Bessel function will be evaluated. The second pair is
Table 4.2 Overview of the
first input variable “wh” of
the class bessel. The order
ν could be complex, n is an
integer number, z complex,
and x a positive real number
WH
EXPLANATION
‘J’
Bessel function of first kind J ν (z).
‘Y’ Bessel function of second kind Y ν (z).
‘H1’ Bessel function of third kind, Hankel function H
(1)
ν (z).
‘H2’ Bessel function of third kind, Hankel function H
(2)
ν (z).
‘I’
Modified Bessel function of first kind I ν (z).
‘K’ Modified Bessel function of second kind K ν (z).
‘sj’ Spherical Bessel function j n (z).
‘sy’ Spherical Bessel function y n (z).
‘sh1’ Spherical Bessel function h
(1)
n (z).
‘sh2’ Spherical Bessel function h
(2)
n (z).
‘si1’ Spherical Bessel function i
(1)
n (z).
‘si2’ Spherical Bessel function i
(2)
n (z).
‘sk’ Spherical Bessel function k n (z).
‘be’ Kelvin function ber ν (x) and bei ν (x).
‘ke’ Kelvin function ker ν (x) and kei ν (x).
Précédent

- 92/287

Suivant