function test_gdft % Some simple gdft tests % ------- test_gdft.m -------------------------------------- % Marios Athineos, marios@ee.columbia.edu % http://www.ee.columbia.edu/~marios/ % Copyright (c) 2004-2005 by Columbia University. % All rights reserved. % ---------------------------------------------------------- % The (0,0) GDFT is simply the DFT (normalized) % In order to get the matrix just transform the identity G1 = gdft(eye(4),0,0) % And here is the corresponding DFT D = fft(eye(4))/sqrt(4) % Another way to generate the matrix is through the dedicated % function. The code for gdftmtx() shows a simpler way to % without twiddling factors (but slow) G2 = gdftmtx(4,0,0) % Now the odd-frequency OFDFT is simply G3 = gdft(eye(4),1/2,0) % And as a sanity for forward/inverse we get the identity I = igdft(gdft(eye(4),1/2,0),1/2,0)