Error when using "pspectrum" with "spectrogram" option.
Show older comments
Hello,
I am trying to plot the pspectrum of a signal, using the following command: pspectrum(SmallY,fs,'spectrogram') and I get the error listed below. SmallY is a 1x100,000 double array (here attached). What puzzles me most is that the same command works for another array, which is a 1x 9000 double (attached here as normal.mat).
Could someone please help with this? I don't see what is the difference between the two arrays, why is one working and the other not. Below, I am also listing the "code", although it's not much. Of course, the same code goes for 'normal' array.
load SmallY
fs=100000;
pspectrum(SmallY,fs,'spectrogram')
-----------------------------------------------------------------------------------------
Error using matlab.graphics.axis.Axes/set
Error setting property 'CLim' of class 'Axes':
Value must be a 1x2 vector of numeric type in which the second element is larger than the
first and may be Inf
Error in signalwavelet.internal.convenienceplot.plotTFR (line 178)
set(ancestor(hndl,'axes'),'CLim',[Pmax plotOpts.threshold]);
Error in pspectrum>displaySpectrogram (line 1078)
signalwavelet.internal.convenienceplot.plotTFR(t,f,10*log10(abs(P)+eps),plotOpts);
Error in pspectrum>computeSpectrogram (line 451)
displaySpectrogram(T,F,P,opts.IsNormalizedFreq,opts.MinThreshold,FRES,TRES);
Error in pspectrum (line 251)
[P,F,TORPWR] = computeSpectrogram(opts, nargout==0);
Error in test_27apr (line 17)
pspectrum(SmallY,fs,'spectrogram')
---------------------------------------------------------------------------------------------------------------
Accepted Answer
More Answers (0)
Categories
Find more on Title in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!