Numeric to Ordinal-String
- accepts a numeric array of any size,
- accepts a numeric array of any class (float, int or uint),
- returns a string array (not a character array!),
- is fully vectorized (no loops or ARRAYFUN calls are used or required),
- provides the correct ordinal suffixes for numeric values ending in 11, 12, or 13.
Cite As
Stephen23 (2022). Numeric to Ordinal-String (https://www.mathworks.com/matlabcentral/fileexchange/42833-numeric-to-ordinal-string), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by: Number to Ordinal String Converter, ORDNUMSTR, Number to Scientific Prefix, Customizable Natural-Order Sort, Number to Words, Words to Number
Inspired: Words to Number, Numeric to Yllion, Number to Words, Interactive Regular Expression Tool
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.