How to apply filter to smooth data?

size(A)=[512 1].
What is the function to smooth 'A' with either moving average or least square method?

 Akzeptierte Antwort

Image Analyst
Image Analyst am 18 Apr. 2013

0 Stimmen

One way:
windowSize = 7; % Bigger number = more smoothing.
smoothedSignal = conv(noisySignal, ones(windowSize, 1)/windowSize, 'same');

Weitere Antworten (1)

Sean de Wolski
Sean de Wolski am 17 Apr. 2013

0 Stimmen

doc smooth
If you have the Curve Fitting Toolbox.

2 Kommentare

Yun Inn
Yun Inn am 17 Apr. 2013
I don't have Curve Fitting Toolbox. Alternative?
Sean de Wolski
Sean de Wolski am 18 Apr. 2013
A few options would be to use filter() or conv() or a for-loop.
Or you could purchase the CFT :)

Melden Sie sich an, um zu kommentieren.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by