High-pass filtering in MATLAB

后端 未结 3 1363
被撕碎了的回忆
被撕碎了的回忆 2020-12-02 09:37

Does anyone know how to use filters in MATLAB? I am not an aficionado, so I\'m not concerned with roll-off characteristics etc — I have a 1 dimensional signal vector x sampl

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 10:08

    Create your filter - for example using [B,A] = butter(N,Wn,'high') where N is the order of the filter - if you are unsure what this is, just set it to 10. Wn is the cutoff frequency normalized between 0 and 1, with 1 corresponding to half the sample rate of the signal. If your sample rate is fs, and you want a cutoff frequency of 10 Hz, you need to set Wn = (10/(fs/2)).

    You can then apply the filter by using Y = filter(B,A,X) where X is your signal. You can also look into the filtfilt function.

提交回复
热议问题