I did divide array with 2D into small boxes 2D also,the problem is how to get each box into sequential blocks.

2 views (last 30 days)
I did divide array of (32,32) into boxes with (8,8) so I got 16 box. I need to get those boxes into sequential block for instance : b where (i=1,2,...,16). when i start to allocate memory for it as
for i=1:16, b(i)=zeros(8,8); end
I stack there , please help me with that.

Answers (1)

Mischa Kim
Mischa Kim on 1 May 2014
Sundus, you could use cell arrays
data = eye(32);
b = mat2cell(data,8*ones(1,4),8*ones(1,4));
Access the individual submatrices via b{1,2}, for example.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!