MATLAB: How to make bandpass filter

bandpass filterfilter designMATLAB

Dear community, I have got a signal with a noise. Frequency of this noise is 50 kHz. How can I cut it off? What is the easiest way to make bandpass filter? Thanks in advise.
Andrew

Best Answer

  • OK, then you can do two filters. A highpass filter and a notch filter (I'll assume you have fdesign.notch)
    d = fdesign.highpass('Fst,Fp,Ast,Ap',2500,3000,60,0.5,5e6);
    Hd1 = design(d,'butter');
    d2 = fdesign.notch('N,F0,Q',10,5e4,35,5e6);
    Hd2 = design(d2);
    Hd = cascade(Hd1,Hd2);
    Now you can use Hd to filter data.
    out = filter(Hd,input);
    You can view the filter with
    fvtool(Hd,'Fs',5e6)