%% wave2dDCT1 %usage: wave2dDCT1(m) % show all 2D DCT wave forms for a square image % m: number of rows and columns of the image matrices % S. Allen Broughton function Z = wave2dDCT1(m) dt = 8^2/m^2; for r = 1:m for s=1:m X = zeros(m,m); X(r,s) =1; Y = idct2(X); subplot(2,1,1) imagesc(X,[0,1]) colormap(gray) axis tight axis square title('coefficient'); subplot(2,1,2) imagesc(Y) colormap(gray) axis tight axis square title('waveform'); pause(dt) end; end;