|
I am having a problem concatenating cells that have different dimension. Lets see here is how it is. I have a cell called MSchT that has a bx1 number of cells. Now inside every cell of MSchT, (e.g. MSchT{1,1}), there is one value to begin with, but as you go through the loop it saves values into one of these cells at a time and then I have to concatenate the values again. So lets see a short example, after it saves the first value it looks like this:
MSchT{1,1} = [124 156]
MSchT{2,1} = [114]
MSchT{3,1} = [119]
Since they do not have the same number of columns it is not letting me concatenate them.
I have been using the following code,
minmach = cell2mat(MSchT);
I would like to be able to concatenate, and if for whatever reason I have to give a value to the empty spots just give 0's so it looks like this:
minmach = [124,156;
114, 0;
119, 0]
Thanks in advance for your help and time!
|