%khwong 160910
%demonstarte the use of spectrogram.m in matlab 
%see ch2,page20 of
%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('tz1.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')
