Thread Subject:
Moving average to smooth 2D data

Subject: Moving average to smooth 2D data

From: zheng

Date: 19 Jan, 2011 19:41:07

Message: 1 of 3

hi, all
I just went through the help for Moving Average filtering. Based on my understanding, the algorithm only can be used to smooth (1 Dimensional ) one column or one row of values. as shown in the equation.
ys(i)=(y(i+N)+y(i+N-1)+...+y(i-N))/(2N+1)
as presented here:
http://www.mathworks.com/help/toolbox/curvefit/bq_6yqb.html
but the figure (a, b, c, d) for moving average filtering looks like that it smooths every point in x and y.

I hope my question is made clearly .

thanks

Subject: Moving average to smooth 2D data

From: Sean de

Date: 19 Jan, 2011 19:54:06

Message: 2 of 3

"zheng " <fiendniu2003@hotmail.com> wrote in message <ih7eoj$66c$1@fred.mathworks.com>...
> hi, all
> I just went through the help for Moving Average filtering. Based on my understanding, the algorithm only can be used to smooth (1 Dimensional ) one column or one row of values. as shown in the equation.
> ys(i)=(y(i+N)+y(i+N-1)+...+y(i-N))/(2N+1)
> as presented here:
> http://www.mathworks.com/help/toolbox/curvefit/bq_6yqb.html
> but the figure (a, b, c, d) for moving average filtering looks like that it smooths every point in x and y.
>
> I hope my question is made clearly .
>
> thanks

conv2(your_image,ones(3)./9,'same');

Will calculate the average of your_image and 8-connected neighbors. Extend it as you need.

Subject: Moving average to smooth 2D data

From: zheng

Date: 19 Jan, 2011 20:05:05

Message: 3 of 3

Sean de

Thanks for replying.
my purpose is to use moving average to smooth a group of points which each point has x and y.
that is why I want to know does the moving average in curve fitting toolbox can implement this?

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
convolution Sean de 19 Jan, 2011 14:59:19
rssFeed for this Thread

Contact us