Bessel function of first kind
J = besselj(nu,Z)
J = besselj(nu,Z,1)
The differential equation
where ν is a real constant, is called Bessel's equation, and its solutions are known as Bessel functions.
Jν(z) and J–ν(z) form a fundamental set of solutions of Bessel's equation for noninteger ν. Jν(z) is defined by
where Γ(a) is the gamma function.
Yν(z) is a second solution of Bessel's equation that is linearly independent of Jν(z). It can be computed using bessely.
J = besselj(nu,Z) computes the Bessel function of the first kind, Jν(z), for each element of the array Z. The order nu need not be an integer, but must be real. The argument Z can be complex. The result is real where Z is positive.
If nu and Z are arrays of the same size, the result is also that size. If either input is a scalar, it is expanded to the other input's size.
Create a column vector of domain values.
z = (0:0.2:1)';
Calculate the function values using besselj with nu = 1.
format long besselj(1,z)
ans = 0 0.099500832639236 0.196026577955319 0.286700988063916 0.368842046094170 0.440050585744934
Define the domain.
X = 0:0.1:20;
Calculate the first five Bessel functions of the first kind.
J = zeros(5,201); for i = 0:4 J(i+1,:) = besselj(i,X); end
Plot the results.
plot(X,J,'LineWidth',1.5) axis([0 20 -.5 1]) grid on legend('J_0','J_1','J_2','J_3','J_4','Location','Best') title('Bessel Functions of the First Kind for v = 0,1,2,3,4') xlabel('X') ylabel('J_v(X)')
The Bessel functions are related to the Hankel functions, also called Bessel functions of the third kind,
where is besselh, Jν(z) is besselj, and Yν(z) is bessely. The Hankel functions also form a fundamental set of solutions to Bessel's equation (see besselh).
 Abramowitz, M., and I.A. Stegun, Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series #55, Dover Publications, 1965, sections 9.1.1, 9.1.89, and 9.12, formulas 9.1.10 and 9.2.5.
 Carrier, Krook, and Pearson, Functions of a Complex Variable: Theory and Technique, Hod Books, 1983, section 5.5.
 Amos, D.E., "A Subroutine Package for Bessel Functions of a Complex Argument and Nonnegative Order," Sandia National Laboratory Report, SAND85-1018, May, 1985.
 Amos, D.E., "A Portable Package for Bessel Functions of a Complex Argument and Nonnegative Order," Trans. Math. Software, 1986.