Equivalence Scipy.signal Welch To Matlab Pwelch
Solution 1:
The problem is solved when using detrend=False
as stated in the GitHub issue https://github.com/scipy/scipy/issues/8045#issuecomment-337319294
Solution 2:
Your parameters seem correct and I can reproduce your result in Python.
An explanation for the difference is possibly the different implementation of the Welch' method in MATLAB and SciPy. Looking at the graph and that the behavior manifests only close to zero I find this likely.
You could try to play with input values (window length, sample frequency, FFT length) a little bit and see if the problem persists. If not you may have found an edge case (perhaps do to numerical errors) in the function and there is nothing you can do about it apart from digging into the implementation details which is not possible in MATLAB's case.
Post a Comment for "Equivalence Scipy.signal Welch To Matlab Pwelch"