function voxelList = parseCoordinateTextField(model) s = get(model.txtVoxelDef,'String'); rows = size(s,1); voxelList = []; for i = 1:rows if all(isspace(s(i,:))) continue; end line = s(i,:); [roi rem] = strtok(line,'+'); roimod = eval(str2mat(rem(2:end))); coord.name = roi; coord.mod = roimod; voxelList = [voxelList; coord]; end end