MATLAB: How to convert from (diagonal matrix to criculant matrix) and Vice versa

circulant diagonal matrix fft ifft fourierMATLAB

Theoretically when applying Fourier transform on a circulant matrix, the result will be a diagonal matrix, and the opposite operation is also work. When using (fft) or (ifft) functions in Matlab the result isn't the same as the theoretical, can any body help

Best Answer

Not sure what theoretical result you're citing. It is true that if you do an FFT of all the columns of a circulant matrix followed by an IFFT on all the rows, you will get a diagonal matrix, and the following illustrates that.
>> C
C =
2 1 0 1
1 2 1 0
0 1 2 1
1 0 1 2
>> ifft(fft(C).').'
ans =
4 0 0 0
0 2 0 0
0 0 0 0
0 0 0 2