# MATERNIMP is the jMatern module of jLab.

``` MATERNIMP  Impulse response function for the Matern random process.

[T,G]=MATERNIMP(N,ALPHA,LAMBDA) returns first N points for the impulse
response function G for a *unit-variance* complex-valued Matern process
with slope parameter ALPHA and damping or range parameter LAMBDA.

The impulse response function is also known as the Green's function.

T is an array of times T=[EPSILON 1:1:N] where the first point is set to
a very small number, set to EPSILON=1e-6 to avoid the potential for
infinite values at T=0 for some parameter settings.

The sample interval is taken to be unity.  The damping parameter LAMBDA
is understood to have units of the inverse of the sample interval.

Note that for LAMBDA=0, the case of fractional Brownian motion, G is
formally defined but is not useful because it does not decay.

The input parameters ALPHA and LAMBDA may either be scalars or arrays
of the same length M.  If the latter, then the output autocovariance
function R will be a matrix with N rows and M columns.

See MATERNSPEC for a more thorough discussion of the Matern process.

For details on the Matern process and impulse response function, see:

Lilly, Sykulski, Early, and Olhede, (2017).  Fractional Brownian
motion, the Matern process, and stochastic modeling of turbulent
dispersion.  Nonlinear Processes in Geophysics, 24: 481--514.
__________________________________________________________________

Oscillatory Matern

MATERNIMP(N,ALPHA,C), where C is complex, uses LAMBDA=REAL(C) for the
damping parameter and also sets a rotation frequency to OMEGA=-IMAG(C).

The associated oscillatory process undergoes rotations at frequency
OMEGA in addition to the damping at timescale 1/LAMBDA.
__________________________________________________________________

Specified times

G=MATERNIMP(T,ALPHA,LAMBDA) where the first argument is an *array*
rather than a scalar, will alternately return the impulse response at
the specified times T.  Note T is not output again in this case.
__________________________________________________________________

Use in fast generation

[T,G]=MATERNIMP([],ALPHA,LAMBDA) where the first argument is the empty
set, evaluates the Green's function at the points T = [0:1:N-1]'+1/2.
This form is utilized in the fast generation method implemented by
MATERNOISE and discussed in Section 5 of Lilly et al. (2017).
__________________________________________________________________