[x, fs]=wavread('bzzzt96_44.wav');
xt=fft(x);
clf();
xlabel('Frequency  Hz');
ylabel('log magnitude');
lab=sprintf('Sampling rate is %d ',fs);
title(lab);
labf=fs/4
lab2=sprintf('%d',labf);
lab3=sprintf('%d',2*labf);
lab4=sprintf('%d',3*labf);
lab5=sprintf('%d',4*labf);
tickloc=rows(xt)/128
if (fs==88200)
   set (gca, 'xtick', [0 35*tickloc 64*tickloc 93*tickloc 128*tickloc]);
else
   set (gca, 'xtick', [0 32*tickloc 64*tickloc 96*tickloc 128*tickloc]);
endif
set (gca, 'xticklabel', {'0', lab2, lab3, lab4, lab5});
hold on;
semilogy(abs(xt));
hold off;
