MATLAB: How to merge two array’s

MATLAB

I have two array and I want to merge in one . A =['test']; B= [1, 2, 3]; C= ['test', 1, 2, 3];

Best Answer

{ A, B }
will merge them into a cell array as two distinct cells
[ A, num2cell( B ) ]
will give you a 4-element cell array with the elements of B each in their own cell.