How to apply filter to smooth data?

1 次查看(过去 30 天)
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