low121 {RTisean}R Documentation

Low pass filter

Description

Applies a simple low pass filter in the time domain.

Usage

low121(series, l, x = 0, c = 1, i = 1)

Arguments

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.

Details

Applies a simple low pass filter:

x'[n] = (x[n-1]+2*x[n]+x[n+1])/4

Value

A vector consisting of the filtered time series.

Examples

## 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)

[Package RTisean version 3.0.10 Index]