Gaussian Filter

45 次查看(过去 30 天)
fcarl
fcarl 2011-6-29
Hi,
i'm searching for a Gaussian Filter to filter an 1d trace (125 Hz, x-axis:time, y-axis:signal) with a cutoff=4 Hz. Is there a function in matlab?
Thanks for your efforts!

回答(7 个)

Rick Rosson
Rick Rosson 2011-6-29
In the Signal Processing Toolbox, please try either filterbuilder or guassfir.
HTH.

David Young
David Young 2011-6-30
A Gaussian filter does not have a sharp frequency cutoff - the attenuation changes gradually over the whole range of frequencies - so you can't specify one. This follows from the fact that the Fourier transform of a Gaussian is itself a Gaussian.
What you usually specify is the frequency at which you require a certain attenuation. This is inversely proportional to the "width" of the Gaussian in the temporal domain. (It's not really a width - again it's the time at which the curve drops to a certain fraction of its maximum.)
You can find the detailed formulae and a proper description of all this (better than will fit into a MATLAB Answers answer) in signal processing textbooks. There's a starting point on the web at the Wikipedia article.

Rick Rosson
Rick Rosson 2011-6-30
Please review the function reference page in the MATLAB documentation:
doc gaussfir
This page provides information on how to specify the 3 dB points.
HTH.

Michele Bertoni
Michele Bertoni 2018-6-27
Hi to all, I'm a bit confused.... First of all, I can't understand why should I apply low-pass gaussian filter to digital (1-D such audio or else) signal.... I've always seen IIR Butterworth or similar, maybe is it a zero-phase?
Taking a look to Wikipedia gaussian filter page I can understand gaussian on both time and frequency domain have same shape, ok. St=sigma (in time domain) Sf=sigma (in frequency domain)
St*Sf=1/(2*pi) ok, clear.
It's also said Sf is equivalent to cut-off frequency, in this case: Fs = sampling frequency fc = cut-off frequency St = sigma (in time domain) in number of samples fc=Fs/(2*pi*St)
But in this case fc equals to -6dB, while it's used correction factor c for different cut-off value.
Ok, let's take fcarl example: Fs = 125Hz fc = 4Hz I get St = 5, so I need to take gaussian kernel from -5 to 5 (11 values), is this right? But about coefficient values? Thanks,

fcarl
fcarl 2011-6-30
I found the function gaussfir but how do I specify my cutoff frequency (4 Hz)? sampling frequency is 125 Hz

fcarl
fcarl 2011-6-30
I`m sorry. By cutoff frequency I mean the frequency where the signal amplitude decreases by a factor of 2 (drop of power by 3dB).

fcarl
fcarl 2011-7-1
Hi Rick,
thanks for your answers. I read through the documentation of gaussfir. And I want to ask if I'm right :):
I want to create a Gaussian filter with a 3-db frequency of 4 Hz. My sampling rate is 125 Hz.
Is it right to make: gaussfir(4*0.008) to produce the right function?
And I want to have 33 coefficents of the Gaussian filter. So I set n (symbol periods) to 8. Is this right? What does the oversampling factor mean?
  1 个评论
fcarl
fcarl 2011-8-9
The question is still standing^^ any comments? is my assumption right?

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by