Take a look at str2num
txt='0,1,2,3,9,8.2,5,6,4,8,4,5,.2,4,3,2';
numArray=str2num(txt)
if txt is a cell array you can use cellfun and str2num
txt={'0,1,2,3' '9,8.2,5,6' '4,8,4,5' '.2,4,3,2'}
tmp=cellfun(@str2num,txt,'UniformOutput',false)
numArray = [tmp{:}]