First differences filter

First, you should read up on Matlab’s documentation of the filter function. If you just want to take a first difference, what you’re looking to generate is the series: Which corresponds to the vector a = 1, and b = [1, -1], so your Matlab code would look like:

scipy.signal.spectrogram compared to matplotlib.pyplot.specgram

The following code generates a spectrogram using either scipy.signal.spectrogram or matplotlib.pyplot.specgram. The color contrast of the specgram function is, however, rather low. Is there a way to increase it? Using matplotlib.pyplot.specgram gives the following result: Using scipy.signal.spectrogram gives the following plot Both functions seem to use the ‘jet’ colormap. I would also be generally interested in the difference between the two functions. Although they … Read more