ifft2 with "symmetric option"

3 views (last 30 days)
Alberto Paniate
Alberto Paniate on 23 May 2022
Commented: Walter Roberson on 23 May 2022
Hi, I am looking at "ifft2" in matlab ( https://it.mathworks.com/help/matlab/ref/ifft2.html#bvjz37f-symflag ) and it introduces a "symmetric" option, that treats the matrix as a conjugate symmetric.
What does it mean " treats the matrix as a conjugate symmetric"?
If my matrix is not, what does it do?

Answers (1)

Chunru on 23 May 2022
Edited: Chunru on 23 May 2022
Let F(u, v) be the forward FFT2 of f(x, y). For real function f(x,y), FT exhibits conjugate symmetry, i.e. F(u, v) = F*(-u, -v). Therefore if the input to IFFT2 is conjugate symmetric, the output will be the real. It is also possible to save some computations in this case comapreing general complex IFFT2.
In practical situation, the input to IFFT2(F), i.e. F, can be non-symetric conjugate even for real f due to rounding error. Therefore a flag 'symmetric' will treat input F as conjugate symmetric and allows faster IFFT2 and ensure the output to be real.
Walter Roberson
Walter Roberson on 23 May 2022
iift2() invokes ifftn() or invokes ifft() twice, passing the symmetry flag each time.
In my test with ifft() and the 'symmetric' option, the output was bit for bit identical when I used ifft('symmetric') on complex data, versus when I manually took the complex data and formed the complex conjugate in the expected form and ifft2('symmetric') that. For data of length 10 (which is even length), that looked like
[F(1), F(2:5), real(F(6)), conj(fliplr(F(2:5)))]
If it had been the second half of the input signal that was being used for 'symmetric', the output would have been different instead of identical.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!