Question: how to use filter in matlab?
Answer: If you have DSP System Toolbox™, use y = filter(dObj,x) to filter an input signal x with a dfilt object dObj . To use the filter function with the b coefficients from an FIR filter, use y = filter(b,1,x) .