N = 5;
F = (0:(N-1))';
R = (0:(N-1))+0.5;
unDCT = cos(pi*F*R/N)
iunDCT = inv(unDCT);

figure(1)
subplot(2,1,1);
plot(unDCT')
title('unnormalized analysis waveforms')
subplot(2,1,2);
plot(iunDCT)
title('unnormalized synthesis waveforms')
disp('Press a key'); pause

dot1 = unDCT*unDCT'
disp('Press a key'); pause
DCT = real(sqrt(dot1))\unDCT
iDCT = inv(DCT)
disp('Press a key'); pause
dot2 = DCT'*DCT 
disp('Press a key'); pause


figure(2)
subplot(2,1,1);
plot(DCT')
title('normalized analysis waveforms')
subplot(2,1,2);
plot(iDCT)
title('normalized synthesis waveforms')
disp('Press a key'); pause
