필터 지우기
필터 지우기

ifft2 with "symmetric option"

조회 수: 13 (최근 30일)
MementoMori
MementoMori 2022년 5월 23일
댓글: Walter Roberson 2022년 5월 23일
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?
Thanks

답변 (1개)

Chunru
Chunru 2022년 5월 23일
편집: Chunru 2022년 5월 23일
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.
  댓글 수: 4
Chunru
Chunru 2022년 5월 23일
When you want to test if conj(x) == y, which is equivelant to rea(x)==real(y) && imag(x)==-imag(y), any small rounding error may break down this test (I am not sure how matlab internally tests this condition).
However, if you treat them as symmetric, you can always ensure F(u, v) = F*(-u, -v) by using only the positive (or first half) frequency data and not using the other half directly. You can also use some type of average of the two numbers at the supposingly symmetric points. Again, I am not sure how matlab exactly implment this.
Walter Roberson
Walter Roberson 2022년 5월 23일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Transforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by