MATLAB: Concatenate a double to a cell

concatenation

This is probably a silly question but:
I have a 4164×7 cell and a 4164×1 double. I want to concatenate so as to get a 4164×8 cell. However, all my methods have come up nil (cat, vertcat and horzcat). I have even tried to transpose the array. Any help would be nice.

Best Answer

a={1 2 3;4 5 6}
b=[5 8 12]
out=[a;num2cell(b)]
Related Question