MATLAB: Turning doubles of different dimensions in cells

num2cell

temp = [time, Dynamics];
temp = num2cell([temp{:}]);
Hey guys,
I have a 1×6 cell called temp. It contains doubles with different dimensions:
double 222×1 double 222×1 double 222×1 double 222×1 double 222×1 double 151×1
Is there a way to 'trick' the num2cell function to the make the temp cell look like being made of consistent dimensions?
Thanks a lot for your help! 🙂
Best,
Sven

Best Answer

I can think of two ways
  1. Create a matrix with a height of the tallest vector, and then paste the vectors in. Short vectors will have zeros below them in their column.
  2. Interpolate the short vectors to be the same length as the taller ones using interp1() spline() or similar functions.
Would any of those methods suffice?