%demonstarte th3 use of spectrogram in matlab 
%see ch2,page20,
%http://www.cse.cuhk.edu.hk/~khwong/www2/cmsc5707/5707_02_preprocess.pptx
%[S,F,T] = SPECTROGRAM(X,WINDOW,NOVERLAP,F,Fs)
%[Y,FS,NBITS,OPTS]=wavread('tz2.wav'); %old for matlab, maybne for octave
%NBITS
%OPTS

[Y,FS]=audioread('tz2.wav'); %for new matlab

FS
figure(1)
clf
spectrogram(Y,1024,128,512,FS,'yaxis')
%spectrogram(Y)
xlabel('time in seconds, ')
ylabel('spectrogram(Y,1024,128,512,FS=44100,yaxis')
