%% wave 1D
%% show 1D pure wave forms as stem plots
 
%define sample rates and frequency

N = 32
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);
   subplot(2,1,1);
   plot(tN,real(sampwave),'r');
   axis([-0.1,1.1,-1.1,1.1]);
   title('real part');
   subplot(2,1,2);
   plot(tN,imag(sampwave),'g');
   axis([-0.1,1.1,-1.1,1.1]);
   title('imaginary part')
   disp(['k=',num2str(k),', press a key']) 
   pause
   end

