how to recived input user in matlab
2 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Rik
on 29 May 2020
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 Comments
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!