Moving average to smooth 2D data

  • Follow


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 
0
Reply zheng 1/19/2011 7:41:07 PM

"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.
1
Reply Sean 1/19/2011 7:54:06 PM


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? 
0
Reply zheng 1/19/2011 8:05:05 PM

2 Replies
1015 Views

(page loaded in 0.041 seconds)

Similiar Articles:













7/23/2012 6:30:43 AM


Reply: