Filter löschen
Filter löschen

changing isstrprop to ischar?

1 Ansicht (letzte 30 Tage)
Kim
Kim am 28 Feb. 2013
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 :)

Antworten (1)

Jan
Jan am 28 Feb. 2013
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.

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by