Skip to main content
1-Visitor
November 22, 2010
Solved

Matrix operations

  • November 22, 2010
  • 1 reply
  • 3758 views

Hello. I have a matrix that I want to average say 5x5 elements with no overlapping. Spent all day trying and have given up now!

Could some one point me to my error, and how to deal with padding round the outside.

Thanks

Jason

Best answer by RichardJ

If you don't lke the way A is indexed you could divide the range variables by pxls and multiply everything in the submatrix statement by pxls.

1 reply

1-Visitor
November 22, 2010

The image you provided doesn't have a symmetrical array. You say you want an average of 5x5 region, but your image shows an array with 2 x 5x5 regions and 2 3x5 regions.

I'm a little confused.

Mike

Jbryant611-VisitorAuthor
1-Visitor
November 22, 2010

Hi Mike, the coloured graphic was just to show that I don't want the 5x5 area to be overlapped (I only showed a portion of it). If you look at the matrix M, this is a 2048 X 2048 MATRIX.

Thanks

Jason

RichardJ19-TanzaniteAnswer
19-Tanzanite
November 22, 2010

If you don't lke the way A is indexed you could divide the range variables by pxls and multiply everything in the submatrix statement by pxls.