The spectrogram
function is expecting a vector windowing argument in its second argument, if supplied. You need to supply values for all the arguments up to and including Fs
. But these arguments can optionally be empty, so you can do:
[S, F, T] = spectrogram(Sound, [], [], [], Fs);
% Sample rate is the fifth argument ^^
Although note that, to use this function properly, you really should understand what the rest of the parameters do/mean... (I'm not going to explain them here; you could write entire books on the topic, and indeed many have been)