首页 > 解决方案 > Removing mean does not give symmetric signal

问题描述

I am using 64-bit Windows with Matlab R2017a.

I have Matlab data stored in a vector here. When I plot the data using the command figure; plot(B), it looks like this:

enter image description here

Normally, when you remove the mean from a signal like this which looks almost periodic, the signal becomes symmetric about the x-axis. I tried this using the code B2 = B - mean(B);. Upon plotting with the command figure; plot(B2), I get this: enter image description here

which is not symmetric (max value is around 0.9 and min value is around -1.25). However, this result is not true for a very similar dataset found here. Before removing the mean, C looks like this: enter image description here

And after, C2 = C - mean(C) looks like this: enter image description here

which is symmetric about the x-axis (max value is around 1.1 and min value is around -1.1).

What results in this difference for these two seemingly similar datasets?

标签: matlabmeansymmetric

解决方案


"Normally, when you remove the mean from a signal like this which looks almost periodic, the signal becomes symmetric about the x-axis."

That only is true, if your values are equally distributed. And your "looks periodic" is exactly what your dataset is: It looks kinda periodic, but it isn't. You have much more values close to zero than to -2. You see this a) when calculating your median, which is -0.1618 on dataset B and also visually the time it rests at zero is much longer (approx. 700 samples) than when it's around -2.2 (~400 samples).


推荐阅读