From: Roger Stafford on
"Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message <i225p2$9bs$1(a)fred.mathworks.com>...
> You could also do it this way:
>
> [m,n] = size(A);
> B = A(floor((p:p*(m+1)-1)/p),floor((q:q*(n+1)-1)/q));
>
> where single elements in A are to be expanded into a p x q size block.
>
> Roger Stafford
- - - - - - -
Or along the same lines but possible faster:

B = A( repmat(1:size(A,1),p,1) , repmat(1:size(A,2),q,1) );

Roger Stafford
From: Emily Bauner on
Thank you so much, guys, for those fast replies. It's exactly what I needed - you're awesome!