isStringScalar
入力が 1 つの要素をもつ string 配列かどうかを判別
説明
例
配列が string スカラーであるかどうかを判別
さまざまな配列を作成し、それらが string スカラーであるかどうかを判別します。
string スカラーをテストします。
str = "Mercury"
str = "Mercury"
tf = isStringScalar(str)
tf = logical
1
複数の要素をもつ string 配列をテストします。str
には複数の要素があるため、isStringScalar
は 0
を返します。
str = ["Mercury","Gemini","Apollo"]
str = 1x3 string
"Mercury" "Gemini" "Apollo"
tf = isStringScalar(str)
tf = logical
0
文字ベクトルをテストします。文字ベクトルは string ではないため、isStringScalar
は 0
を返します。
chr = 'Pluto'
chr = 'Pluto'
tf = isStringScalar(chr)
tf = logical
0
入力引数
A
— 入力配列
任意のサイズとデータ型の配列
入力配列。任意のサイズとデータ型の配列として指定します。
バージョン履歴
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)