MATLAB: Do I receive an error message while returning values using the SPECTROGRAM function with the frequency location string specified in the Signal Processing Toolbox 6.3 (R14SP2)

invalidoptionSignal Processing Toolboxxaxisyaxis

When I execute the following commands at the MATLAB command prompt:
T = 0:0.001:2;
X = chirp(T,0,1,150);
F = 0:.1:100;
[Y,F,T,P] = spectrogram(X,256,250,F,1E3,'yaxis');
I receive the following error message:
??? Error using ==> signal\private\welchparse
Ambiguous or invalid string option specified.
Error in ==> spectrogram at 106
[x,nx,xisreal,y,Ly,win,winName,winParam,noverlap,k,L,options,msg] = ...

Best Answer

The ability to specify a frequency location string as an input argument to the SPECTROGRAM function while returning function outputs is not available in Signal Processing Toolbox 6.4 (R14SP2).
For example, the following usage is not supported:
[Y,F,T,P] = spectrogram (..., 'freqloc')
This feature is now available in the Signal Processing Toolbox 6.4 (R14SP3).
If you are using a previous version, in order to work around this issue, do not specify a frequency location string when returning a value. For example, you can use the following commands:
T = 0:0.001:2;
X = chirp(T,0,1,150);
F = 0:.1:100;
[Y,F,T,P] = spectrogram(X,256,250,F,1E3);