DiffMat | R Documentation |
This function generates a matrix for computing differences of a certain order, useful in numerical methods and for creating specific matrix patterns.
DiffMat(n, q)
n |
The number of data points |
q |
The order of the difference |
A matrix with dimensions n-q-1
by n
, whose elements correspond to the combinatorial values of q
.
XMat
Mat1 <- DiffMat(n = 10, q = 0)
print(Mat1)
Mat2 <- DiffMat(n = 15, q = 1)
print(Mat2)
Mat3 <- DiffMat(n = 15, q = 2)
print(Mat3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.