MCD

Matlab code MCD: Numerical quadrature computation of the Macdonald function for complex orders. The use of Gaussian quadrature formulae is explored for the computation of the Macdonald function (modified Bessel function) of complex orders and positive arguments. It is shown that for arguments larger than one, Gaussian quadrature applied to the integral representation of this function is a viable approach, provided the (nonclassical) weight function is suitably chosen. In combination with Gauss-Legendre quadrature the approach works also for arguments smaller than one. For very small arguments, power series can be used. A Matlab routine is provided that implements this approach.