powered by
This function is used to reduce the sampling rate of a time series by an integer factor.
decdc(x, df, go_slow = FALSE)
y The decimated signal vector or matrix. It has the same number of columns as x but has 1/df of the rows.
A data structure, vector or matrix containing the signal(s) to be decimated. If x is a matrix, each column is decimated separately.
The decimation factor. The output sampling rate is the input sampling rate divided by df. df must be an integer greater than 1.
if TRUE the function will NOT use Rcpp to speed up convolution. Default is FALSE. This input is for testing and benchmarking.
s <- matrix(sin(2 * pi / 100 * c(0:1000) - 1), ncol = 1) plot(c(1:length(s)), s) y <- decdc(x = s, df = 4) plot(c(1:length(y)), y)
Run the code above in your browser using DataLab