I have a cell array of matrices which look like this:
G =
Columns 1 through 6
[507x1 double] [255x1 double] [130x1 double] [67x1 double] [36x1 double] [19x1 double]
Columns 7 through 9
[11x1 double] [6x1 double] [4x1 double]
This means that the matrices are inside a cell array. Matrix G
has a total of 507+255+130+67+36+19+11+6+4=1035 elements in it. I can extract any cell by using the G{i}
command. However, I need all of these 1035 elements in single column or row matrix. I have tried cell2mat(G)
but that doesn't work.
What can I do here to create a single matrix that contains all of these other matrices together?
cell2mat
not work? This Gist functions as expected. - excaza