Borrar filtros
Borrar filtros

How to Design a Moving average filter?

368 visualizaciones (últimos 30 días)
mohsen
mohsen el 1 de Feb. de 2014
Comentada: Osman Atay Öztürk el 24 de Ag. de 2021
Hi everyone im kinda new with filter design in Matlab and in need of some help..
So basically i need to reduce the noise in an record and playback system based on DSP TMS320c6713.
Right now im stuck in writing the code for Moving average filter (exponential or simple). so can somebody help me out or give me some examples please.. I've been reading a lot and still dont seem to understand much!! Thanks in advance..
  1 comentario
pankaj jood
pankaj jood el 22 de Jun. de 2017
M = movmean(A,k) M = movmean(A,[kb kf]) M = movmean(___,dim) M = movmean(___,nanflag) M = movmean(___,Name,Value)

Iniciar sesión para comentar.

Respuesta aceptada

Wayne King
Wayne King el 1 de Feb. de 2014
Editada: Wayne King el 1 de Feb. de 2014
To implement a simple causal moving average filter in MATLAB, use filter()
Ten-point moving average filter
B = 1/10*ones(10,1);
out = filter(B,1,input);
Adjust as needed for a different number of time steps.
  7 comentarios
Christopher Bitikofer
Christopher Bitikofer el 23 de Ag. de 2018
I think using filtfilt would work... I'm trying to figure something similar out
Osman Atay Öztürk
Osman Atay Öztürk el 24 de Ag. de 2021
windowWidth = 11; % Whatever you want.
kernel = ones(windowWidth,1) / windowWidth;
out = filter(kernel, 1, yourInputSignal);
How can I know this window width?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Measurements and Statistics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by