# bessely

Bessel function of the second kind.

## Syntax

[y,ierr] = bessely(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(real(x))).
Dimension: scalar | vector | matrix

## Outputs

y
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:
y = bessely(3,[10:12;13:15]*i)
y = [Matrix] 2 x 3
1.75838e+03 - 1.73496e-05i  4.75793e+03 - 5.87102e-06i  1.28329e+04 - 2.00639e-06i
3.45380e+04 - 6.91133e-07i  9.28206e+04 - 2.39628e-07i  2.49218e+05 - 8.35453e-08i
Scaled example:
y = bessely(3,[10:12;13:15]*i,1)
y = [Matrix] 2 x 3
7.98304e-02 - 7.87671e-10i  7.94655e-02 - 9.80561e-11i  7.88480e-02 - 1.23277e-11i
7.80672e-02 - 1.56219e-12i  7.71830e-02 - 1.99257e-13i  7.62365e-02 - 2.55567e-14i