Complex number and fft
이전 댓글 표시
So I noticed during processing some images in matlab, that the angle phase images after fft+ifft are not the same as the original anymore. When looking at the matrix, I saw that Matlab stores values sometimes as "0", sometimes as "0.000000000000000 + 0.000000000000000i". I was wondering, what is the difference? Isn´t the whole matrix supposed to contain complex numbers?
I also tried a simpler example myself
V = [0, 2];
W = [0, 2+3i, 5, 0, 3+1i];
fft_V = fft(V);
fft_W = fft(W);
vv = ifft(fft_V);
fs_V = fftshift(fft(V));
vvv = ifft(ifftshift(fs_V));
ww = ifft(fft_W);
fs_W = fftshift(fft_W);
www = ifft(ifftshift(fs_W));
w2 = ifft(fft(ww));
While for V everything is normal, 2 things about W make me wonder:
"www" is the same as W, but why are the signs in front of the "0"s inverted? (from + to -)
If one checks "w2 == ww", Matlab returns: "[0 1 1 1 1]", which seems weird. All 5 values are the same, but somehow, the first entry of the vector returns false?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!