Number to Ordinal String Converter

Version (546 Bytes) by Bill Higley
Converts an integer into its ordinal string.
Updated 9 Jul 2002

No License

This function turns a number into an ordinal string, ie 1 becomes 'first', 2 becomes 'second'. After 'twentieth', the number is used with the appropriate 'st, 'nd', 'rd', or 'th'. Useful for instructionary dialog boxes, etc.

Cite As

Bill Higley (2024). Number to Ordinal String Converter (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R12.1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Characters and Strings in Help Center and MATLAB Answers

Inspired: ORDNUMSTR, Numeric to Ordinal-String

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes