Matlab code to pull numbers out of strings
You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
strnums is a function to scan through a string and isolate just the
numbers before converting to a number.
Optional handling choices are as follows
1. Concatenate all numeric characters together to convert to a
single number, disregarding any separating characters. Leading
zeros are lost except where only zeros exist.
2. Concatenate only adjacent numeric characters, returning a
number per separate block. Leading zeros in any block are lost
except where only zeros exist
3. Concatenate adjacent numeric characters, ignoring undefined
separator characters, but grouping characters according
the characters listed in inputs
4. Return each digit separately
Cite As
Renwick Beattie (2026). strnums (https://github.com/ReneBT/strnums), GitHub. Retrieved .
General Information
- Version 1.0.0 (14.8 KB)
-
View License on GitHub
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
Versions that use the GitHub default branch cannot be downloaded
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0 |
