Functions istext iscelltext

バージョン 1.0.0 (2.74 KB) 作成者: Bill Whiten
Test for char or string variables; Test for cell array of char or string variables.
ダウンロード: 22
更新 2018/9/26

ライセンスの表示

Most function now allow either char of string variables.
However missing are functions to test for either string or char,
and to test for a cell array containing only string or char values.

Two functions v=istext(x) and v=iscelltext(x) are included or
can be used inline as:

istext=@(x)isstring(x)|ischar(x);
iscelltext=@(x)all(cellfun(@(y)isstring(y)|ischar(y),x,'UniformOutput',1));

引用

Bill Whiten (2026). Functions istext iscelltext (https://jp.mathworks.com/matlabcentral/fileexchange/68918-functions-istext-iscelltext), MATLAB Central File Exchange. に取得済み.

MATLAB リリースの互換性
作成: R2018b
R2016b 以降のリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersTest Scripts についてさらに検索
タグ タグを追加
謝辞

ヒントを与えたファイル: Optional function arguments

istext_iscelltext

バージョン 公開済み リリース ノート
1.0.0