Why do I receive an error message while returning values using the

Illustration
Gracesmith9 - 2021-03-18T11:08:07+00:00
Question: Why do I receive an error message while returning values using the

Why 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)? 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] = ...

Expert Answer

Profile picture of Prashant Kumar Prashant Kumar answered . 2025-11-20

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);


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!