小编Ale*_*onB的帖子

MATLAB 和 Python 之间的不同频谱图

我在 MATLAB 中有一个程序,我想将它移植到 Python。问题是我在其中使用了内置spectrogram函数,虽然 matplotlibspecgram函数看起来相同,但当我同时运行这两个函数时,我得到了不同的结果。

这些是我一直在运行的代码。

MATLAB:

data = 1:999; %Dummy data. Just for testing.

Fs = 8000; % All the songs we'll be working on will be sampled at an 8KHz rate

tWindow = 64e-3; % The window must be long enough to get 64ms of the signal
NWindow = Fs*tWindow; % Number of elements the window must have
window = hamming(NWindow); % Window used in the spectrogram

NFFT = 512;
NOverlap = NWindow/2; % …
Run Code Online (Sandbox Code Playgroud)

python matlab signal-processing matplotlib spectrogram

5
推荐指数
1
解决办法
2687
查看次数