How can I split a cell array in which every cell has strings and numbers but the space made them split?
5 views (last 30 days)
Show older comments
Mohammad Hasan Aghdaie
on 15 Dec 2016
Commented: Walter Roberson
on 19 Dec 2016
forexample: cell 1 = reser 1 12 15 55.67 77.899
0 Comments
Accepted Answer
Walter Roberson
on 15 Dec 2016
You can use strsplit() or you can use regexp() with the 'split' option.
4 Comments
Walter Roberson
on 19 Dec 2016
result_num = cell2mat(cellfun(@(C) str2double(C(2:end)), result, 'Uniform', 0));
More Answers (0)
See Also
Categories
Find more on Cell Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!