low121 {RTisean} | R Documentation |
Applies a simple low pass filter in the time domain.
low121(series, l, x = 0, c = 1, i = 1)
series |
a vector or matrix. |
l |
number of data to use. |
x |
number of lines to be ignored. |
c |
column to be read. |
i |
number of iterations. |
Applies a simple low pass filter:
x'[n] = (x[n-1]+2*x[n]+x[n+1])/4
A vector consisting of the filtered time series.
## Not run: numdata <- 500 dat <- cos(1:numdata/25)+rnorm(numdata,0,0.1) plot(dat,xlab="Time",t="l",ylab="Cos Data",ylim=c(-1.7,1.2)) filteredat <- low121(dat,i=10) points(filteredat,col=2,t="l",lwd=2) legend(300,-1.3, c("Noisy Data","Filtered Data"),fill=c(1,2), bty="n") ## End(Not run)