What is in your cell array?
If it is only numeric, the cell2mat function will work. If it also has non-numeric element (such as strings), you need to separate them:
Example —
C = {1 2 3 'Hi!' 4 5 'there!' pi};
numlidx = cellfun(@isnumeric, C);
Num = [C{numlidx}]
Str = C(~numlidx)
Best Answer