MATLAB: Cell to matrix conversion of different dimension

cellcell2matdifferent dimensionmatrix

I have a 1×44 cell with different dimension. I want to change those cell in to single matrix so that I can do manipulation? I try cell2mat but no luck. Is there any way to change cell to matrix of different dimension?

Best Answer

"Is there any way to change cell to matrix of different dimension?"
Not to a numeric matrix, No. Numeric matrices require consistent dimensions.
You could potentially pad the various parts out with NaN or inf or 0 as required so that the parts were the same shape. That gets a bit complex if the arrays might be different numbers of dimensions.