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 CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by