MATLAB: How to extract information from the name of a file without using strsplit function

strsplit

Hello!
I need some help extracting some coordenates from the name of a a file.
I have 224 files named like this: files=[{' x+0.000mm_y_+0.000mm_z_+0.000mm.dat_ '},….].
I want to extract the X coordenate and the Y coordenate (in this case 0.000 both) and finally have a matrix of 224×2 (224 rows for each file (files are points), and 2 columns for x and y).
I can not use strsplit function because i am using Matlab2010. I have tried with regexp:
delim = '[mm+]';
coord = regexp(files,delim, 'split');
but then i obtain a cell array 224×1 awith cells of 1×10 inside an i do not know how to work with it.
Any idea?? I would really appreciate your help.
Thanks!!

Best Answer

files=[{' x+0.000mm_y_+0.000mm_z_+0.000mm.dat_ '} {' x+10.000mm_y_+20.000mm_z_+30.000mm.dat_ '}]
coord = regexp(files,'\d+(\.\d+)?','match')
coord=cell2mat(cellfun(@str2double,coord,'un',0)')