Calculate the matrix giving the linear interpolation of regularly
spaced points.
Usage
interpol.matrix(n = 12, m = 24, tol = sqrt(.Machine$double.eps))
Arguments
n
Number (integer) of points in output space
m
Number (integer) of points in the input function (or space)
tol
A relative tolerance to detect zero singular values.
Value
A nxm matrix if they are integer, else a
sum(n)xsum(m) matrix.
Details
The general principle is, considering a function for which we know
values at m equally spaced points (for instance 1/m,
2/m, ..., 1), to compute the matrix giving the linear
approximation of n equally spaced points (for instance
1/n, 2/n, ..., 1).
The function works whether n or m is the largest.
The function is vectorized, so m and n can be vectors of
integers. In this case, they have to be of the same size and the
resulting matrix is block diagonal.