besseli

Modified Bessel function of the first kind.

Syntax

[i,ierr] = besseli(alpha, x, opt)

Inputs

alpha
The function order.
Type: double
Dimension: scalar | vector | matrix
x
The function argument.
Type: double | complex
Dimension: scalar | vector | matrix
opt
The scaling option.
If set to 1 or true the result contains a factor of exp(-abs(imag(x))).
Dimension: scalar | vector | matrix

Outputs

i
The Bessel function values.
Dimension: scalar | vector | matrix
ierr
The return status flag.
Dimension: scalar | vector | matrix
info = 0
Successful return.
info = 1
Input error, returned NaN.
info = 2
Overflow condition, returned Inf.
info = 3
Calculation has lost at least half of machine accuracy.
info = 4
Calculation has lost significance, returned NaN.
info = 5
Algorithm failed to converge, returned NaN.

Examples

Unscaled example:
i = besseli(3,[10:12;13:15])
i = [Matrix] 2 x 3
 1758.38072   4757.92757   12832.89304
34537.96038  92820.61916  249218.41965
Scaled example:
i = besseli(3,[10:12;13:15],1)
i = [Matrix] 2 x 3
0.07983  0.07947  0.07885
0.07807  0.07718  0.07624

Comments

If alpha and x have different dimensions, a singleton dimension in either variable is expanded to match the corresponding dimension length of the other variable.