How to apply filter to smooth data?

조회 수: 6 (최근 30일)
Yun Inn
Yun Inn 2013년 4월 17일
size(A)=[512 1].
What is the function to smooth 'A' with either moving average or least square method?

채택된 답변

Image Analyst
Image Analyst 2013년 4월 18일
One way:
windowSize = 7; % Bigger number = more smoothing.
smoothedSignal = conv(noisySignal, ones(windowSize, 1)/windowSize, 'same');

추가 답변 (1개)

Sean de Wolski
Sean de Wolski 2013년 4월 17일
doc smooth
If you have the Curve Fitting Toolbox.
  댓글 수: 2
Yun Inn
Yun Inn 2013년 4월 17일
I don't have Curve Fitting Toolbox. Alternative?
Sean de Wolski
Sean de Wolski 2013년 4월 18일
A few options would be to use filter() or conv() or a for-loop.
Or you could purchase the CFT :)

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by