Unwrapped phase from a fourier transform loses information. The method works fine in other packages.

3 views (last 30 days)
using the following code, I should generate an unwrapped phase plot which should be a straight line. This has been checked in Igor and does as expected. In matlab, the first few thousand data points and the final few thousand produce a straight line as expected, however in the middle, the information is apparently lost.
x=0:1:49999;
A=single(exp(-(x-1000).^2/10^2)-exp(-(x-1010).^2/10^2));
B=fft(A);
C=real(B);
D=imag(B);
E=atan(D./C); %this can also be done with E=(cart2pol(D,C))
F=unwrap(E);
plot(F)

Answers (0)

Community Treasure Hunt

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

Start Hunting!