フィルターのクリア

changing isstrprop to ischar?

1 回表示 (過去 30 日間)
Kim
Kim 2013 年 2 月 28 日
How can i write this statement with "ischar" instead of "isstrprop"
if isstrprop(reply, 'alpha')
E(misspelled_wordnum(i)) = {reply};
elseif str2num(reply) >= 1 && str2num(reply) <= suggestion_length
E(misspelled_wordnum(i)) = sorted_suggestion(str2num(reply), 1);
end
Help me please :)

回答 (1 件)

Jan
Jan 2013 年 2 月 28 日
ischar tests, if the type of the input has the class 'char'. isstrprop(strin, 'alpha') checks, if the elements of the string are alphabetic characters. These are two different jobs and you cannot replace one by the other.

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by