// auto-correlation plot

DATLEN=400;
OFFSET=20000;

rand('normal');
noise=rand(1:DATLEN);
voice=loadwave('male.wav');
voice=voice(1+OFFSET:DATLEN+OFFSET);

cornoise=xcorr(noise);
cornoise=cornoise/max(cornoise);

corvoice=xcorr(voice);
corvoice=corvoice/max(corvoice);

scf(0);
clf;
plot2d(cornoise, style=2);
plot2d(corvoice, style=5);
