Skip to content

MATLAB code for Low Pass Filter (LPF) and High Pass Filter (HPF) based on Fast Fourier Transform (FFT).

License

Notifications You must be signed in to change notification settings

KRproject-tech/FFT_filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

図1

FFT_filter

Communication

Twitter

Language

MATLAB code for Low Pass Filter (LPF) and High Pass Filter (HPF) based on Fast Fourier Transform (FFT) 1.

Usage

filtered_data = FFT_filter_func( raw_data, [f_min f_max], plot_flag);

where

raw_data = [ time_vec data_vec]: time data time_vec [s] and time series of raw data data_vec [a.u.].

[f_min f_max]: bandpass [Hz].

plot_flag: When the argument is present, the FFT spectrum is plotted.

Source codes

  • FFT_filter_func.m: FFT fliter function.

  • demo.m: demonstration for FFT_filter_func.m.

Images

Input data example:

$f(t) = 4\cos( 2\pi t) + 2\cos( 2\pi 10t) + \sin( 2\pi 100t)$

  • Power spectrum of input data

untitled

  • 0-20Hz LPF: FFT_filter_func( data, [0 20], 1); 0-20_Hz

  • 0-5Hz LPF: FFT_filter_func( data, [0 5], 1); 0-5_Hz

  • 5- Hz HPF: FFT_filter_func( data, [5 Inf], 1); 5-Inf_Hz

References

Footnotes

  1. .

About

MATLAB code for Low Pass Filter (LPF) and High Pass Filter (HPF) based on Fast Fourier Transform (FFT).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages