about strings properties issstrprop

1 Ansicht (letzte 30 Tage)
Umut Oskay
Umut Oskay am 20 Mai 2020
Kommentiert: Rik am 22 Mai 2020
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

Akzeptierte Antwort

Rik
Rik am 20 Mai 2020
You forgot the 's' switch with your call to input:
s= input('s: ','s');
isstrprop(s, 'alpha')
  2 Kommentare
Umut Oskay
Umut Oskay am 22 Mai 2020
Can you explain what is the purpose of that ‘s’
Rik
Rik am 22 Mai 2020
The documentation explains it already:
str = input(prompt,'s') returns the entered text, without evaluating the input as an expression.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 20 Mai 2020
Remove the semi-colon.
isstrprop('saraaba123', 'alpha')
  1 Kommentar
Umut Oskay
Umut Oskay am 20 Mai 2020
sorry can you check the question again .

Melden Sie sich an, um zu kommentieren.

Kategorien

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by