Difference Between Python and MATLAB Spectrograms

11 visualizaciones (últimos 30 días)
Ron Levine
Ron Levine el 16 de Jul. de 2020
Comentada: Carla Peterson el 13 de En. de 2023
I am comparing the MATLAB and Ptyhon spectrogram output stft and Sxx. The values of stft and Sxx differ by orders of magnitude and are not linearly related. Why is this?
MATLAB
[stft,f,t] = spectrogram(x,nWind,nOver,[],sRate);
Python
f, t, Sxx = scipy.signal.spectrogram(x, fs=sRate, nperseg=nWind, noverlap=nOver, nfft=256, mode='complex')
  1 comentario
Carla Peterson
Carla Peterson el 13 de En. de 2023
Was this ever resolved? I'm having the same issue and I'm wondering why they are different and what else I should do to get the same results between two programs. I really don't want to convert my Matlab to Python at this time. I'm using someone else's Python code.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by