%% wave1dmovie
%% show 1D pure wave forms as line plots, show the abstract frequency (cycles)
 
N = 128
tN = (0:(N-1))/N;  % discrete time points
K = N;  % number of displays
i = sqrt(-1);

% display results 
for k = 0:K
   sampwave = exp(2*pi*i*k*tN);
   rS = real(sampwave);
   iS = imag(sampwave);
   zr = zerocount(rS);
   zi = zerocount(iS);
   subplot(2,1,1);
    plot(tN,rS,'r');
    axis([-0.1,1.1,-1.1,1.1]);
    title('real part');
    drawnow
   subplot(2,1,2);
    plot(tN,iS,'g');
    axis([-0.1,1.1,-1.1,1.1]);
    title('imaginary part')
    drawnow
   pause(.1)
   end

