【发布时间】:2017-04-05 01:11:57
【问题描述】:
当我在 Matlab 和 Python 中对相同数据运行 welch 函数时,PSD 估计值略有不同,而样本频率相同。
这是我在 Matlab 和 Python 中使用的参数: MATLAB:
winlength=512;
overlap=0;
fftlength=1024;
fs=127.886;
[PSD, freqs] = pwelch(data, winlength, overlap, fftlength, fs);
Python:
freqs, PSD = welch(data, fs=127.886, window='hamming', nperseg=512,
noverlap=None, nfft=1024)
这是一个展示差异的情节: enter image description here
有谁知道我应该改变什么来获得相同的 PSD 结果?
【问题讨论】: