MATLAB: Transform char variable to matrix

MATLABvariable

Hi, I have a cell variable that looks like this:
I'D like to know if there is a way to transform it into a matrix of this kind:
NewVar=[2 5; 2 3; 2 5];
Thanks

Best Answer

tmp = {'002,005';'002,003';'002,005'};
NewVar = cell2mat(cellfun(@(S) sscanf(S, '%f,%f').', tmp, 'uniform', 0));