Passing argument to cellfun matlab
问题 Hello I have a cell array of char (separated by underscore) that I would like to convert to double. I do it in a for loop, but since the dimensions are very big, it takes a lot of time. I would like to use cellfun , but I don't know how to pass the delimiter. Can you help me? listofwords = {'02_04_04_52';'02_24_34_02'}; for i = 1 : size(listofwords,1) listofwords_double(i,:) = str2double(strsplit(listofwords{i},'_'))./1000; end listofwords_double2= cellfun(@strsplit , listofwords); Benchmark