clear;
 [frame, Fs, nbits]=wavread('vowel_a.wav');
 L=1024;
 tt=[1:L];
 subplot(1,2,1); plot(tt,frame);
 axis([0 L-1 -0.3 0.3]); grid;
 xlabel('Time n'); ylabel('Amplitude')
 
Y=fft(frame, L);
 Y_Power=Y .* conj(Y) ./L ./L;
 M=10*log10(Y_Power(1:L/2));
 ber=linspace(1,Fs,L);
 subplot(1,2,2); plot(ber(1:L/2), M)
 xlabel('Frequency [Hz]')
 ylabel('Magnitude [dB]')
 grid;
