cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Matrix operations

Jbryant61
4-Participant

Matrix operations

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

ACCEPTED SOLUTION

Accepted Solutions
RichardJ
19-Tanzanite
(To:Jbryant61)

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.

View solution in original post

5 REPLIES 5

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

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

RichardJ
19-Tanzanite
(To:Jbryant61)

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.

Jbryant61
4-Participant
(To:RichardJ)

Thanks Richard. Could you comment on my use of this for a real situation of trying to align an illumination source onto a sample.

Thanks

Jason

RichardJ
19-Tanzanite
(To:Jbryant61)

For alignment I would think what's needed is a real-time response. I can't envision myself aligning any optics by collecting some data, importing it to Mathcad, looking at the results, going back to the instrument.......

Perhaps a better solution would be to design optics that give more uniform illumination in the first place. Your illumination looks very non-uniform, and it's hard to imagine it couldn't be made better than that.

Announcements

Top Tags