High-pass filtering in MATLAB

后端 未结 3 1362
被撕碎了的回忆
被撕碎了的回忆 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:16

    A cheapo way to do this kind of filtering that doesn't involve straining brain cells on design, zeros and poles and ripple and all that, is:

    * Make a copy of the signal
    * Smooth it.   For a 100KHz signal and wanting to eliminate about 10Hz on down, you'll need to smooth over about 10,000 points.   Use a Gaussian smoother, or a box smoother maybe 1/2 that width twice, or whatever is handy.  (A simple box smoother of total width 10,000 used once may produce unwanted edge effects)
    * Subtract the smoothed version from the original.  Baseline drift will be gone.
    

    If the original signal is spikey, you may want to use a short median filter before the big smoother.

    This generalizes easily to 2D images, 3D volume data, whatever.

提交回复
热议问题