FFT

9 views (last 30 days)
Melissa
Melissa on 9 Mar 2012
Good Afternoon All,
I was wondering if matlab's fft function could only be applied to cartesian coordinates? I have generated polar coordinates for the data points and then use a cubic spline for create a function to run the fft on but when i apply the ifft the function seems to have scaled up and shifted. Is this a result of my coordinate system?
Thanks,
Mel

Answers (1)

Walter Roberson
Walter Roberson on 9 Mar 2012
fft does not know or care what kind of data it is being applied to.
What are you doing in-between the fft() and the ifft()?
If you fft() some data, change the first element of the result, and fft() back, you will see shifting, as the first element corresponds to the mean of the data (the "base line")
  7 Comments
Melissa
Melissa on 9 Mar 2012
photo of the plot. http://www.mediafire.com/?1mcyrxgayxoa3al
Walter Roberson
Walter Roberson on 9 Mar 2012
With that small of a difference between those two quantities, the fft / ifft is essentially leaving the data unchanged. If you were to assign
fft_inverse = fft_fun;
that is, to skip the fft and ifft, then you would have essentially no difference in the results.
Looking at your plot, the minimum and maximums of the two are the same, and basically you are just seeing the effect of having supplied explicit x coordinates for the first plot but having used the default 1:length(y) x coordinates for the second plot.
Try replacing your second plot() with
plot(rconvert.*angles, fft_inverse);
I am not positive that that will be correct, but it will give you the common x coordinates to work from for the plots.

Sign in to comment.

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!