figure(1); clf;

% [d,r] = wavread(...
%     'C:\Documents and Settings\bruce land\My Documents\Matlab\Speech\AllDigits8khz.wav')

d = chirp(0:1/8000:2,125,2,3500);
N = length(d);

for i = 0:fix(N/32)-1
    %x = d([1:2:64]+(i*64));
    x = d([1:32]+(i*32));
    X = abs(dct(x));

    subplot(2,1,1)
    plot(x)
    set(gca,'ylim',[-1 1],'xlim',[1,32])

    subplot(2,1,2)
    plot(X)
    set(gca,'ylim',[-5 5],'xlim',[1,32])
    
    drawnow
    pause(.033)
end