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

 채택된 답변

Rik
Rik 2020년 5월 20일

0 개 추천

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

댓글 수: 2

Umut Oskay
Umut Oskay 2020년 5월 22일
Can you explain what is the purpose of that ‘s’
Rik
Rik 2020년 5월 22일
The documentation explains it already:
str = input(prompt,'s') returns the entered text, without evaluating the input as an expression.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2020년 5월 20일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Adding custom doc에 대해 자세히 알아보기

태그

질문:

2020년 5월 20일

댓글:

Rik
2020년 5월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by