I am trying to implement the following line of MATLAB code:
[pxx, f] = pwelch(data,[],[],4096,F_S)
in Python. Knowing that MATLAB using a Hamming window type that uses 8 segment with 50% overlap, my attempt was
freq, PSD =
signal.welch(data, F_S, window='hamming', nperseg=None, noverlap=None, nfft=4096)
However, I receive different results that on the eye look similar but aren't. MATLAB predicts a power peak of 0.13 at the 2nd entry of the pxx
vector, while Python predicts a power peak of 0.33 at the 32nd entry of the PSD
vector. Did I do something wrong?