Hi Elinor, the ppsptectrum function does not return the output directly in dB to be plotted. According to the documentation,
For the plot, the function converts p to dB using 10*log10(p)
- You can use ppspectrum with no output arguments to plot the spectral estimate in the current window.
ppspectrum(speech, f1);
- Another way is to manually convert p to dB.
Hope this helps.