Strange result with Fourier transform after frequency removal
Show older comments
I have a line profile that Im trying to obtain a "width measurement" on. The problem is that its polluted with wiggles.

I was thinking taking the FT, removing the highest component and then inverse FT would be a useful method.
However, my code is giving strange results. My x and y data is also attached
%look at FT to try and remove periodic ringing
F = fftshift(fft2(ydata)); %Take the FT
sF = log(abs(F)); %frequency spectrum
mxsF=max(sF(:)) %Determine max contributor
ind=find(sF==mxsF) %Find its frequency (i.e.. x-axis)
%View frequency current spectrum
subplot(1,4,4)
plot(sF,'b.')
grid on
hold on
%suppress peak freq
sF(ind)=0;
new=abs(fftshift(ifft(sF))); %inverse transform
plot(sF,'r-')
hold off
figure
plot(x,new)
Accepted Answer
More Answers (0)
Categories
Find more on Frequency Transformations 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!