I have a cell array containing 1x4 cells
A=
<1x4 cell> <1x4 cell> <1x4 cell>
<1x4 cell> <1x4 cell> <1x4 cell>
<1x4 cell> <1x4 cell> <1x4 cell>
<1x4 cell> <1x4 cell> <1x4 cell>
<1x4 cell> <1x4 cell> <1x4 cell>
<1x4 cell> <1x4 cell> <1x4 cell>
<1x4 cell> <1x4 cell> <1x4 cell>
<1x4 cell> <1x4 cell> <1x4 cell>
<1x4 cell> <1x4 cell> <1x4 cell>
<1x4 cell> <1x4 cell> <1x4 cell>
What I'm looking for is to make a cell array containing something like the following
B={'str1','str2','str3','str4';cell2mat(A{1,1})}
A cell array comes from another operations where the size in rows and columns can vary, so I would like to know weather or not this could be automatized using a for loop or something like that.
Edit:
Sorry i would like to have an array B:
B{m,n}={'str1','str2','str3','str4';cell2mat(A{m,n})}
where m and n are the rows and columns of cell array A.
So lets say I have something like
A=
[1 2 3 4] [4 5 6 7]
[8 9 10 11] [11 12 13 14]
I would like to obtain an output B of the form
B{1}=
'str1' 'str2' 'str3' 'str4'
1 2 3 4
8 9 10 11
B{2}=
'str1' 'str2' 'str3' 'str4'
4 5. 6 7
11 12 13 14
A, and how you expect the corresponding cell in the outputBto be.. - Amrocell2matwithnum2cell- Mohsen Nosratinia