one (single)-sided fft and fft2
Show older comments
The solution of FFT is symmetric. I am wondering whether there is a built-in function to produce a one(single)-sided solution. One-dimensional transform is simple. How can we make a 2D FFT producing a single-sided solution?
7 Comments
David Goodmanson
on 19 Jun 2018
Edited: David Goodmanson
on 19 Jun 2018
Hello Linan,
You mean that the fft of a REAL function is symmetric.
Also, once symmetry is taken into account, a 2n-point fft has n+1 independent coefficients,and a (2n+1)-point fft also has n+1 independent coefficients. Given the output of a single-sided fft you are going to have to either keep track somehow of the original number of points or restrict the one-sided fft to, say, real functions with an even number of points.
Linan Xu
on 20 Jun 2018
David Goodmanson
on 20 Jun 2018
Before you get to 2d, what about the situation in 1d? For an 8 point fft_half, the result has five elements. For a 9 point fft_half, the result also has five elements. Ifft_half cannot distinguish between those two cases. So:
x = 1:9
ifft_half(fft_half(x))
ans =
1.0000
9.0000
8.0000
7.0000
6.0000
5.0000
4.0000
3.0000
2.0000
which is not quite right, but fixable. On the other hand,
x = 1:8
ifft_half(fft_half(x))
ans =
0.4444
7.0181
6.5430
5.5331
4.9259
3.9630
3.3558
2.3459
1.8708 % nine elements
Linan Xu
on 20 Jun 2018
David Goodmanson
on 20 Jun 2018
it's better, although ifft_half(fft_half ... ) still does not bring x = 1:9 back to 1:9
Linan Xu
on 20 Jun 2018
David Goodmanson
on 20 Jun 2018
Since the intent was simply to transpose input s to a column vector without complex conjugation, it might be clearer later on to take your previous code and use s.' instead of s' in a couple of places.
fft2(rand(4,4)) or fft2(rand(5,5)) or fft2(rand(5,4)) shows that placement of the complex conjugates is not so easy in the 2d case.
Answers (0)
Categories
Find more on Fourier Analysis and Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!