% set up parameters 

N   = 64;
C   = dct(eye(N));
%Ci  = idct(eye(N));
Ci = inv(C);
mn  = min(C(:));

figure(1) 
for i =1:N 
   D=C;
   D(i,:)= mn*ones(1,N);
   subplot(2,2,1)
   imshow(D,[]); 
   title('Analysis matrix')
   subplot(2,2,2)
   plot(1:N,C(i,:));
   axis([1,N,-1,1]);
   title('Analysis waveform')
   
   D=Ci;  
   D(:,i)= mn*ones(N,1);
   subplot(2,2,3)
   imshow(D,[]); 
   title('Synthesis matrix')
   subplot(2,2,4)
   plot(1:N,Ci(:,i));
   axis([1,N,-1,1]);
   title('Synthesis waveform')

   drawnow;
   pause(1)
   end;




