about strings properties issstrprop

s= input('s: ');
isstrprop(s, 'alpha')
i wrote this code and it doesnt work. .How should i write. if i right Hello1234 as a input of s , i want to get 1 1 1 1 1 0 0 0 0 as an answer

 采纳的回答

You forgot the 's' switch with your call to input:
s= input('s: ','s');
isstrprop(s, 'alpha')

2 个评论

Can you explain what is the purpose of that ‘s’
The documentation explains it already:
str = input(prompt,'s') returns the entered text, without evaluating the input as an expression.

请先登录,再进行评论。

更多回答(1 个)

Remove the semi-colon.
isstrprop('saraaba123', 'alpha')

类别

帮助中心File Exchange 中查找有关 Adding custom doc 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by