DiffMat {L0TFinv} | R Documentation |
Generate a difference matrix
Description
This function generates a matrix for computing differences of a certain order, useful in numerical methods and for creating specific matrix patterns.
Usage
DiffMat(n, q)
Arguments
n |
The number of data points |
q |
The order of the difference |
Value
A matrix with dimensions n-q-1
by n
, whose elements correspond to the combinatorial values of q
.
See Also
Examples
Mat1 <- DiffMat(n = 10, q = 0)
print(Mat1)
Mat2 <- DiffMat(n = 15, q = 1)
print(Mat2)
Mat3 <- DiffMat(n = 15, q = 2)
print(Mat3)
[Package L0TFinv version 0.1.0 Index]