4.4 The SPECFUNPHYS-Class Bessel
79
-2
10
-1
0
0.5
1
z 0
2
imag(nu)
0
-10 -0.5
0
10
20
0.5
40
z 0
60
imag(nu)
0
-10 -0.5
Fig. 4.2 On the left-hand side the real values of the Bessel function J ν (z) are plotted and on the
right-hand side the real values of the modified Bessel function I ν (z). For both plots ν is between
2 − 0.5i · · · 2 + 0.5i and −10 ≤ z ≤ 10
“scaled” with value “yes” or “no” (default) to compute scaled Bessel or modified
Bessel functions as described above.
The outputs are the object of the Bessel class “obj” with properties: “value” for
the function value, “z” for the function argument (input “z”), “nu” the order of the
function (input “nu”), and “cell” with general information about the function and its
evaluation. The output “result” is the same as obj.value.
As an example we visualize the Bessel functions J ν (z) and I ν (z). The
result is shown in Fig. 4.2. Whereas J ν (z) shows an oscillatory behavior, I is
for negative arguments monotonically decreasing and for positive arguments
monotonically increasing. (For imaginary z-values, the Bessel function I ν (z)
behaves oscillatory and vice versa.) The functions values will be computed via
objJ = bessel(’J’,Nu,Z); For each ν-value at least one information line
will be created in “obj.info” to uncover the computational method. If we are
only interested in the functional values we could use as well [˜,result] =
bessel(’J’,Nu,Z); or result = bessel(’J’,Nu,Z).value;.
Figure 4.2 is based on the following program:
% Example Bessel function I and J
y = linspace(-0.5,0.5,50);
nu = 2 + i * y;
% complex order - fixed real part
z = linspace(-10,10,100);
% function argument
[Nu, Z] =meshgrid(nu,z);
%
objJ = bessel(’J’,Nu,Z);
% Bessel function J
subplot(1,2,1)
% visualization
surf(imag(Nu),Z,real(objJ.value)),shg
xlabel(’imag(nu)’),ylabel(’z’), shg
%
objI = bessel(’I’,Nu,Z); % modified Bessel function I
subplot(1,2,2)
% visualization
surf(imag(Nu),Z,real(objI.value)),shg
Précédent

- 93/287

Suivant