I have a cell array of strings. Each string contains at maximum one number and an unknown amount of other characters, for example 'abc13def'. I would like to extract these numbers from the cell array into a numerical array. The elements of the array corresponding to cells which have no number at all should be set to zero.
MATLAB: How to extract all numbers from a cell array of strings
cellextractMATLABnumbersstringstrip
Related Question
- How could it be determined one array of a cell containing an string or a number
- Putting spaces between strings
- Combine a cell array of cell arrays to a single cell array
- Disp format for strings
- Extracting sub cell arrays from a cell array
- How to add strings
- Can I convert empty strings to NaNs automatically in a cell array
Best Answer