matlab - 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:
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:
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:
And after, C2 = C - mean(C)
looks like this:
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?
解决方案
"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).
推荐阅读
- java - 无法在 Android 应用程序中将 SQLite3 与 C++ 本机代码一起使用
- flutter - 列表视图颤动中未显示数据
- reactjs - useSelector 无法从“react-redux”导出
- algorithm - 从给定 N 个整数中找出有多少不同的三元组数字的总和可以被整数 M 整除
- tortoisesvn - TortoiseSVN - 从存储库添加单个文件到工作副本
- authentication - 使用身份核心控制用户登录
- python-3.x - 如何忽略python中的错误“由于网络错误而退出代码1:ContentNotFoundError”?
- vba - 具有查找的隐藏输入字段的 VBA 输入
- c# - 在 Sqlcommand 中使用 Remove 和 RemoveAt
- python - Sqlalchemy 刷新和提交 ORM 对象和 mysql 元数据锁