MATLAB: How to convert a 1XM array into NXM array

arraycell arraysMATLAB

I have a 1×12 array, where each element is a vector of doubles (the vectors have different lengths). How can I convert to a NX12 array, where N is the length of the vector with most elements.

Best Answer

You could do this yourself, but by far the simplest solution is to download Jos's excellent padcat:
If C is your 1x12 cell array, then just do this:
padcat(C{:})