The function introduces the implementation of fft and ifft in filtering and cleaning of signals.
The function plots
1. the original signal,
2. its transform,
3. the reconstructed (filtered) signal.
You can control the filtering by giving your parameters.
Comprehensive help is included (>>help fftf).
The code is extensively commented.
Works very nicely and solved the problem with minor rectification.
Reconstructed signal has problem of scaling. It needs to multiplied by length of signal. After fft, it was divided by length, which need to nullify.
Suggestions(already given by others also):
1. Plotting can be option, default off.
2. band pass, high pass option can be added.
3. raw plots instead of normalized plot to compare with original.
Why not apply a low-pass filter instead of simply setting to 0 the spectral amplitudes above the cut-off frequency?
With your technique, the result might be erroneous due to aliasing.
Otherwise, nice function.
Thank you for sharing! Very useful and clearly written.
I noticed that the output signal is always plotted on a scale of -1 to +1. I take it this is always a normalized plot?
Undefined function 'fftf' for input arguments of type 'double'.
I just wanted to use my signal... any suggestions?
This code is so good! I have learned a lot from you code and have simply changed it to have 3 filtering mode. Don't know how to update it in comment. Anyway, thanks for sharing this!
Can This code be used as a bandpass filter？
Very nice and easy to use fft-implementation. I've used this extensively for my thesis. Thanks a lot!
Excellent code. For a mech eng, this is a godsend.
Also made the change Craig made.
Well written code. The commenting on the lines is very much appreciated making it easier for the user to follow. Thank you very much!!
anybody help to run this code.
I changed line 56 from:
in order to return original scaling
This file saved me some time writing my own, thank you very much!
Very well written. Thanks a lot. It helped me so much.
included a screenshot
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.