Matlab - Signal Noise Removal

后端 未结 5 753
独厮守ぢ
独厮守ぢ 2021-02-04 16:11

I have a vector of data, which contains integers in the range -20 20.

Bellow is a plot with the values:

\"en

5条回答
  •  爱一瞬间的悲伤
    2021-02-04 16:40

    You might try a split window filter. If x is your current sample, the filter would look something like:

    k = [L L L L L L 0 0 0 x 0 0 0 R R R R R R]
    

    For each sample x, you average a band of surrounding samples on the left (L) and a band of surrounding samples on the right. If your samples are positive and negative (as yours are) you should take the abs. value first. You then divide the sample x by the average value of these surrounding samples.

    y[n] = x[n] / mean(abs(x([L R])))
    

    Each time you do this the peaks are accentuated and the noise is flattened. You can do more than one pass to increase the effect. It is somewhat sensitive to the selection of the widths of these bands, but can work. For example:

    before

    Two passes:

    after

提交回复
热议问题