% EE 438 Digital Signal Processing with Applications - Spring 1997
% This script plots the different sections of a speech signal.
%---------------------------------------------------------------
% Initialize
clear all;
close all;
%Read and play back data sampled at 8192 Hz
Fs = 8192;
Nplots = 4;
%---------------------------------------------------------------

data=load('erf1s1t0');
plot(data)
%end1=input('end1?');
%end2=input('end2?');
%x = data(end1:end2);
x = data;
N1 = length(x)
N2 = floor(N1/Nplots)
input('Speech waveform');
soundsc(x,Fs);
figure(2);
for k = 1:1:Nplots
        clear t;
        t = ((k-1)*N2+1)./Fs:1./Fs:k*N2./Fs;
        subplot(Nplots,1,k), plot(t, x((k-1)*N2+1:k*N2))
        axis([(k-1)*N2./Fs k*N2./Fs -2000 2000])
end


