Filter löschen
Filter löschen

Gaussian Filter

41 Ansichten (letzte 30 Tage)
fcarl
fcarl am 29 Jun. 2011
Beantwortet: Michele Bertoni am 27 Jun. 2018
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!

Antworten (7)

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

David Young
David Young am 30 Jun. 2011
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 am 30 Jun. 2011
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 am 27 Jun. 2018
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 am 30 Jun. 2011
I found the function gaussfir but how do I specify my cutoff frequency (4 Hz)? sampling frequency is 125 Hz

fcarl
fcarl am 30 Jun. 2011
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 am 1 Jul. 2011
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 Kommentar
fcarl
fcarl am 9 Aug. 2011
The question is still standing^^ any comments? is my assumption right?

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by