dderiv | R Documentation |
Calculation of the first derivatives, by finite differences, of the row observations (usually spectra) of a data set.
dderiv(X, n = 3, ts = 1)
X |
A |
n |
The number of points (i.e. columns of |
ts |
A scaling factor for the finite differences (by default, |
A matrix.
data(datcass)
X <- datcass$Xu
n <- 11
zX <- dderiv(X, n) # = 1st derivate
#zX <- dderiv(dderiv(X, n), n) # = 2nd derivate
headm(X)
headm(zX)
oldpar <- par(mfrow = c(1, 1))
par(mfrow = c(1, 2))
plotsp(X, main = "Signal")
plotsp(zX, main = "Corrected signal", zeroes = TRUE)
par(oldpar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.