📄 interactivefourierfilterinfo.txt
字号:
Interactive Fourier Filter ( version 1.4, October 29, 2006)
A fourier filter for time-series signals. Does not
require the Signal Processing Toolbox.
There is an interactive version with sliders that
allow you to adjust the filter parameters
continuously while observing the effect on your signal
dynamically. By adjusting the parameters, you can create
lowpass, highpass, bandpass, and bandreject (notch)
filters with variable cut-off rate. See:
http://www.wam.umd.edu/~toh/spectrum/InteractiveFourierFilter.htm
for more information.
FouFilter.m: Basic Fourier Filter function
function ry=FouFilter(y,center,width,shape,mode)
Simple fourier filter function for time-series signal y.
'Center' and 'width' are the center harmonic and width of
the filter. 'Shape' determines the sharpness of the
cut-off. If shape = 1, the filter is Gaussian; as shape
increases the filter shape becomes more and more
rectangular (faster cut-off rate). Set mode = 0 for
band-pass filter, mode = 1 for band-reject (notch)
filter. Function returns the filtered signal.
Example: plot(FouFilter(tan(1:1000),15,2,2,0))
InteractiveFourierFilter.m
Interactive Fourier Filter script for data in global variables
x,y. To use it, place the signal in the global variables x,y
(x = independent variable, y = dependent variable) and then
execute this m-file. In this version, the original and
filtered signals are displayed in separate windows. (To
display the original signal and filtered signal superimposed
in the same window, rename AlternativeRedrawFourierFilter.m
to RedrawFourierFilter.m) The bottom plot shows
the power spectrum of the original signal (in blue)
and the spectrum of the filter (in red). The x-axis of this
plot is the harmonic number. Filtered signal returned in
global variable ry.
There are 4 sliders for interactive control of the filter
parameters: The Center slider controls the center harmonic,
the Width slider controls the width of the filter, and the
Shape slider determines the sharpness of the cut-off.
(If shape = 1, the filter is Gaussian; as shape
increases the filter shape becomes more and more rectangular).
The Mode slider has only 4 settings: mode=0 for band-pass
filter, linear plot; mode=1 for band-pass filter,
semilogx plot; mode=2 for band-reject (notch) filter, linear plot;
mode=3 for band-reject (notch) filter, semilogx plot.
iff.m
function ry=iff(x,y). Interactive Fourier Filter function.
Takes the signal (x,y) as arguments, returns the filtered
signal. Otherwise identical to InteractiveFourierFilter.m
DemoIFF.m
Self-contained demonstration of Interactive Fourier Filter with
sliders for interactive control. The Signal slider selects from
five different signals (you can change these in iffsignal.m). The
Center slider controls the center frequency of the filter, the Width
slider controls the width, and the Shape slider controls the shape
of the pass band. If shape = 1, the filter is Gaussian; as shape
increases, the filter shape becomes more and more rectangular.
Set mode=0 for band-pass filter, linear plot; mode=1 for band-pass
filter, semilogx plot; mode=2 for band-reject (notch) filter,
linear plot; mode=3 for band-reject (notch) filter, semilogx plot.
In this version, the original and filtered signals are
displayed in separate windows. To display the original
signal and filtered signal superimposed in the same window,
rename AlternativeRedrawFourierFilter.m to RedrawFourierFilter.m
FourierTest.m
Simple fourier filter script, without interactive sliders,
for a simulated a time-series signal. You can change the
charactrer of the simulated signal in lines 11 and 12 and
the filter parameters in lines 15-18. The top plot
shows the original signal (in blue) and the filtered
signal (in red). The bottom plot shows the power spectrum
of the original signal (in blue) and the spectrum of the
filter (in red). The x-axis of this plot is the harmonic number.
October 29, 2006.
Tom O'Haver
Professor Emeritus
Department of Chemistry and Biochemistry
The University of Maryland at College Park
toh@umd.edu
http://www.wam.umd.edu/~toh
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -