FFT
3 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
Walter Roberson
2012-3-9
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 个评论
Walter Roberson
2012-3-9
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.
另请参阅
类别
在 Help Center 和 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!