tags:

views:

48

answers:

1

I have a 64 by 64 cell and how do I merge it back into a 1 by 1 cell? Each cell is a 8 by 8 double.

+4  A: 

Use cell2mat.

%# create a sample 2-by-2 cell array
c = cell(2);

%# put a 3-by-3 double into each cell
[c{:}] = deal(magic(3));

%# convert to one big 6-by-6 array
m = cell2mat(c);

EDIT

If you want the result to be a cell again, run

m = {cell2mat(c)};
Jonas

related questions