How can I plot a string input?
Show older comments
Hello,
How can I plot a string input?
prompt = "What is your name";
txt = input(prompt,"s");
if isempty(txt)
txt = 'Enter your name again.';
end
>> txt =
'MAX'
I want to automatically plot the received string.
Accepted Answer
More Answers (1)
I assume you want to display.
display('David')
txt =input('What is your name','s');
display(txt)
1 Comment
Mohammad Rastegarpanah
on 29 Sep 2022
Categories
Find more on Cell Arrays 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!