MATLAB: Cell2mat simple manipulation question

cell2mat

Hi, if x={'000','101.5'}; x2=cell2mat(x)% which is =000101.5
How can I get x2=[000 , 101.5]?

Best Answer

How about:
x={'000','101.5'};
x2=str2double(x)
or:
x3 = cellfun(@str2double,x)