MATLAB: I would like to rewrite fftshift(f​ft2(fftshi​ft(x)))) as F*x*F.’ but how to handle the fftshifts

dftmtxfftshiftlinear

I would like to rewrite fftshift(fft2(fftshift(x)))) as F*x*F.' (where F = dftmtx(N) and N is the size of x), but how do I handle the fftshifts?
Thanks so much for your help!
Christine

Best Answer

F=fft( fftshift(eye(N),1) ,[],1);
F=fftshift(F,1);