how to recived input user in matlab

1 回表示 (過去 30 日間)
Shehab Tarek
Shehab Tarek 2020 年 5 月 29 日
回答済み: Rik 2020 年 5 月 29 日
i want to recived the word from the user and restore each charater
for example
string=input('enter the string>>');
-- shehab
0=s
1=h
2=e
and so on

採用された回答

Rik
Rik 2020 年 5 月 29 日
You need to specify that you want the result as a char array:
str=input('enter the string>>','s');
It is also a good idea to develop the habit of avoiding builtin Matlab names.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by