Skip to content

__bessel__

help · scripts/help/__bessel__.m

: [J, ierr] = besselj (alpha, x, opt)
: [Y, ierr] = bessely (alpha, x, opt)
: [I, ierr] = besseli (alpha, x, opt)
: [K, ierr] = besselk (alpha, x, opt)
: [H, ierr] = besselh (alpha, k, x, opt)

Evaluate members of the Bessel and Hankel function families.

Every callable name in this family starts with "bessel":

besselj

First-kind Bessel function. Supplying opt scales the result by exp (-abs (imag (x))).

bessely

Second-kind Bessel function. Supplying opt scales the result by exp (-abs (imag (x))).

besseli

First-kind modified Bessel function. Supplying opt scales the result by exp (-abs (real (x))).

besselk

Second-kind modified Bessel function. Supplying opt scales the result by exp (x).

besselh

Hankel function of the first (k = 1) or second (k = 2) kind. Supplying opt scales the result by exp (-I*x) when k = 1, or exp (I*x) when k = 2.

Output sizing follows the usual broadcasting rules: a scalar alpha yields a result sized like x; a scalar x yields a result sized like alpha; a row-vector alpha paired with a column-vector x yields a length (x)-by-length (alpha) matrix; otherwise alpha and x must already conform and the result matches their shape.

alpha, the function order, must be real; the evaluation points x may be complex.

The optional ierr output reports a per-element status code, sized to match the result:

  1. Success.
  2. Invalid input; NaN returned.
  3. Overflow; Inf returned.
  4. Argument-reduction loss of significance leaves under half the machine precision intact.
  5. Argument-reduction loss of significance; the result may be imprecise.
  6. Failure: the algorithm’s termination condition was never met, so no result was computed; NaN returned.