JuliaDSP / DSP.jl

Filter design, periodograms, window functions, and other digital signal processing functionality

Home Page:https://docs.juliadsp.org/dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stateful FIRFilter

TacHawkes opened this issue · comments

I am having troubles setting up the stateful FIRFilter with the information given in the docs.
How can I properly construct a FIRFilter from a designed filter using e.g. Lowpass and design method Butterworth? Could someone provide an example?

Thanks!

Butterworth yields an IIR filter, but FIRFilter is for FIR filters, as the name suggests. You can use remez to design an FIR filter. E.g.:

h = remez(100, [(0, 0.45) => 1, (0.55, 1) => 0]; Hz=2)
H = FIRFilter(h)
y = filt(H, x) # for whatever input x

Better documentation would obviously be welcome.