x <- sin(t(2 * pi * 0.05 * (1:100)) +
t(cos(2 * pi * 0.25 * (1:100))))
Y <- fir_nodelay(x = x, n = 30, fc = 0.2, qual = "low")
plot(c(1:length(x)), x,
type = "l", col = "grey42",
xlab = "index", ylab = "input x and output y"
)
lines(c(1:length(Y)), Y, lwd = 2)
Run the code above in your browser using DataLab