You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
A = PARSE_NUMBERS(S) separates the string, S, into a cell array of substrings which are individually scanned to determine numeric values; results are returned in matrix A.
The behavior of PARSE_NUMBERS can be modified by additional options which are specified as propertyName/propertyValue string pairs; lists of values can be specified as cell arrays of strings.
Options:
NAME / VALUE
-------------------
'del' --delimeter strings
'key' --identifier strings
'dec' --alternative decimal strings
'fmt' --format string passed to sscanf
-----
Please note: There are many ways to achieve similar results by applying one or more of the built-in Matlab string handling functions directly.
Good info here: http://blogs.mathworks.com/loren/2006/12/20/finding-strings/
and here: http://blogs.mathworks.com/loren/2006/04/05/regexp-how-tos/
Also of interest, see the function 'expandstr' in submission FEX 12180.
Cite As
DS (2026). Read numbers from a string. (https://in.mathworks.com/matlabcentral/fileexchange/35802-read-numbers-from-a-string), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.4.0.0 (2.84 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
