MATLAB: Parse a cell array of strings without looping

MATLABparse cell array

I've got a nx1 cell array of strings that correspond to spatial coordinates. Here's an example where n=4,
'122.8233,216.1323,671.8740'
'122.8233,216.1323,671.8740'
'122.8233,216.1323,671.8740'
'122.8233,216.1323,671.8740'
Each row of the cell array is a string containing x,y, and z coordinates separated by a comma. I need to parse each string to separate the coordinates, convert the coordinates to numbers, do an operation on them, then put them back in their original format. Is there a way to do this without looping through each row of the cell array? Any tips or insight would be greatly appreciated.
Regards, Justin

Best Answer

clear
A={'122.8233,216.1323,671.8740'
'122.8233,216.1323,671.8740'
'122.8233,216.1323,671.8740'
'122.8233,216.1323,671.8740'}
B=cellfun(@(x) regexp(x,',','split'),A,'uni',false)
out=cell2mat(cellfun(@(x) [cellfun(@(y) str2num(y),x)],B,'uni',false))
%or easier
out=str2num(cell2mat(A))