iptnum2ordinal
正の整数を序数文字ベクトルに変換
説明
例
整数から序数への変換
数値 4 を序数に変換します。この序数は完全にスペル アウトされます。
str = iptnum2ordinal(4)
str = 'fourth'
数値 23 を序数に変換します。この序数は数字と序数の接尾辞 'rd'
で構成されます。
str = iptnum2ordinal(23)
str = '23rd'
入力引数
number
— 正の整数
数値スカラー
正の整数。数値スカラーとして指定します。
出力引数
number
— 序数
文字ベクトル
序数。文字ベクトルとして返されます。
20 以下の数値はスペル アウトされます。
20 より大きい数値は、数字と序数の接尾辞
'st'
("first" の場合)、'nd'
("second" の場合)、'rd'
("third" の場合)、または'th'
で構成されます。
データ型: char
バージョン履歴
R2006a より前に導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)