Skip to content
Prev 308691 / 398503 Next

Help with applying a function to all possible 2x2 submatrices

300x300 isn't terribly large; looping should work just fine. But I'm
confused about a 2x2 submatrix:
I would have thought that a submatrix would be adjacent elements, like
x[1:2, 1:2]
or
x[13:14, 296:297]
but your loop compares all possible sets of four elements, so the
matrix position doesn't matter except for avoiding duplication.

Maybe a bit more about what you're trying to accomplish (including the
function you want to perform with those four elements) would be
helpful.

Sarah
On Mon, Oct 22, 2012 at 1:10 PM, CMB123 <craig.bielski at gmail.com> wrote: