필터 지우기
필터 지우기

How to Design a Moving average filter?

조회 수: 368 (최근 30일)
mohsen
mohsen 2014년 2월 1일
댓글: Osman Atay Öztürk 2021년 8월 24일
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
pankaj jood
pankaj jood 2017년 6월 22일
M = movmean(A,k) M = movmean(A,[kb kf]) M = movmean(___,dim) M = movmean(___,nanflag) M = movmean(___,Name,Value)

댓글을 달려면 로그인하십시오.

채택된 답변

Wayne King
Wayne King 2014년 2월 1일
편집: Wayne King 2014년 2월 1일
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
Christopher Bitikofer
Christopher Bitikofer 2018년 8월 23일
I think using filtfilt would work... I'm trying to figure something similar out
Osman Atay Öztürk
Osman Atay Öztürk 2021년 8월 24일
windowWidth = 11; % Whatever you want.
kernel = ones(windowWidth,1) / windowWidth;
out = filter(kernel, 1, yourInputSignal);
How can I know this window width?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Measurements and Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by