| interpol.matrix {far} | R Documentation |
Interpolation matrix
Description
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. |
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.
Value
A nxm matrix if they are integer, else a
sum(n)xsum(m) matrix.
Author(s)
J. Damon
See Also
theoretical.coef, simul.far or
simul.farx.
Examples
mat1 <- interpol.matrix(12,24)
mat2 <- interpol.matrix(c(3,5),c(12,12))
print(mat1 %*% base.simul.far(24,5))
print(mat2 %*% base.simul.far(24,5))