Convert positive integer to ordinal character vector
Convert the number 4 to an ordinal number. The ordinal number is spelled out in entirety.
str = iptnum2ordinal(4)
str = 'fourth'
Convert the number 23 to an ordinal number. The ordinal number consists of a
numeral and the ordinal suffix
str = iptnum2ordinal(23)
str = '23rd'
number— Positive integer
Positive integer, specified as a numeric scalar.
number— Ordinal number
Ordinal number, returned as a character vector.
Numbers less than or equal to twenty are spelled out.
Numbers greater than twenty consist of a numeral and an
'st' (for "first"),
'nd' (for "second"),
'rd' (for "third"), or