The Matern covariance function
matern(x, y = NULL, nu = 1, rho = 1, sig = 1)
a vector
If NULL, then y=x.
positive number specifying smoothness of the function.
scale parameter
magnitude parameter
matrix of dimension length(x)*length(y), where the (i,j) entry of the matrix is the Matern covariance evaluated at the point (X(i),Y(j)).
The precise definition of Matern covariance function can be found in see https://en.wikipedia.org/wiki/Matern_covariance_function.