View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
FFT filter - clean your signals and display results!

4.9 | 10 ratings Rate this file 108 Downloads (last 30 days) File Size: 2.54 KB File ID: #25017 Version: 1.2
image thumbnail

FFT filter - clean your signals and display results!


Shmuel Ben-Ezra (view profile)


13 Aug 2009 (Updated )

Perform Fourier transform, filter in frequency domain, reconstruct the signal.

| Watch this File

File Information

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.

MATLAB release MATLAB 7.8 (R2009a)
Other requirements Useful as tutorial and introduction to the field.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (15)
08 Jan 2017 Mahabir

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.

Comment only
27 May 2016 Yann Vonderscher

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.

Comment only
22 May 2016 Yu GUAN


17 Dec 2015 Suzie Mason

Thank you for sharing! Very useful and clearly written.

04 May 2015 Megan

Megan (view profile)

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?

Comment only
23 Sep 2014 Moe Ring

Undefined function 'fftf' for input arguments of type 'double'.

I just wanted to use my signal... any suggestions?

Comment only
22 Apr 2014 Wei-Chih Juang

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!

08 Dec 2013 Fan D.Chen

Can This code be used as a bandpass filter´╝č

11 Sep 2013 Ferdi

Ferdi (view profile)

Very nice and easy to use fft-implementation. I've used this extensively for my thesis. Thanks a lot!

16 May 2013 Alexander

Excellent code. For a mech eng, this is a godsend.

14 Aug 2012 Justin

Justin (view profile)

Works great!

Also made the change Craig made.

09 Jan 2012 Pat

Pat (view profile)

Well written code. The commenting on the lines is very much appreciated making it easier for the user to follow. Thank you very much!!

19 Nov 2011 Saud

Saud (view profile)

anybody help to run this code.

Comment only
30 Nov 2010 Craig Doolittle

I changed line 56 from:
in order to return original scaling

This file saved me some time writing my own, thank you very much!

23 Jan 2010 Alireza Keramat

Very well written. Thanks a lot. It helped me so much.

16 Aug 2009 1.2

included a screenshot

Contact us