about strings properties issstrprop

조회 수: 1 (최근 30일)
Umut Oskay
Umut Oskay 2020년 5월 20일
댓글: Rik 2020년 5월 22일
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일
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일
Remove the semi-colon.
isstrprop('saraaba123', 'alpha')
  댓글 수: 1
Umut Oskay
Umut Oskay 2020년 5월 20일
sorry can you check the question again .

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

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by