how to recived input user in matlab
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!