I want to implement Matlab pwelch function in python. The Matlab code is shown blew:
[PSD,f] = pwelch(data,length(data),,,2000);
which data is a row vector of double type with size (1 * 1547600)
My python code is:
f, Pxx_den = signal.welch(data, fs=2000, window=signal.hanning(len(data)), return_onesided=True, detrend=False)
The output of python code doesn't equal to the output of the Matlab code and I don't know how to set python welch arguments to reach Matlab output results.
Thanks for your attention.