figure; waveFile='sunday.wav'; au=myAudioRead(waveFile); y=au.signal; fs=au.fs; nbits=au.nbits; y=y*2^nbits/2; subplot(2,1,1) time=(1:length(y))/fs; plot(time, y); axis([min(time), max(time), -2^nbits/2, 2^nbits/2]); xlabel('Time (seconds)'); ylabel('Amplitude'); title('Waveforms of "sunday"'); frameSize=512; index1=0.606*fs; index2=index1+frameSize-1; line(time(index1)*[1, 1], 2^nbits/2*[-1 1], 'color', 'r'); line(time(index2)*[1, 1], 2^nbits/2*[-1 1], 'color', 'r'); subplot(2,1,2); time2=time(index1:index2); y2=y(index1:index2); plot(time2, y2, '.-'); axis([min(time2), max(time2), -2^nbits/2, 2^nbits/2]); xlabel('Time (seconds)'); ylabel('Amplitude'); title('Waveforms of the voiced "ay" in "sunday"');