| interpol.matrix | R Documentation |
Calculate the matrix giving the linear interpolation of regularly spaced points.
interpol.matrix(n = 12, m = 24, tol = sqrt(.Machine$double.eps))
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. |
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.
A nxm matrix if they are integer, else a
sum(n)xsum(m) matrix.
J. Damon
theoretical.coef, simul.far or
simul.farx.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.