Date: Oct 11, 2011 11:23 AM
Author: Momo
Subject: Re: Moving window over matrix

"Matt J" wrote in message <j71lpl$sl$1@newscl01ah.mathworks.com>...
> "Momo" wrote in message <j71k00$nba$1@newscl01ah.mathworks.com>...
> > I have a 80X80 matrix= A (say). I need to sum areas of 32X32 in the following fashion.
> > If x and y are the indices of A i,e A(x,y) then the sum will be performed in the following way
> > x=1:32; y=1:32
> > x=16:48; y=16:48
> > x=32:64; y=32:64
> > x=48:80; y=48:80

> ===================
>
>
> Note, by the way, that the regions you have shown are not all 32x32. For example,
>

> >> x=16:48; y=16:48;
> >> length(x),length(y)

>
> ans =
>
> 33
>
>
> ans =
>
> 33


Sorry, my mistake. It will be A(1:32,1:32), A(17:48,1:32),A(33:64,1:32) , A(49:80,1:32).