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

G
Gracesmith9 · Mar 18, 2021 · 2.2K views
Question
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 PhD Expert
Answered Aug 17, 2026
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);
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!