MATLAB Answers

The input command problem

12 views (last 30 days)
David Mboko
David Mboko on 23 Sep 2020 at 19:45
Answered: Star Strider on 23 Sep 2020 at 20:24
Is it possible to assign a letter to an input command, example A=input('please insert your name')

  0 Comments

Sign in to comment.

Answers (1)

Star Strider
Star Strider on 23 Sep 2020 at 20:24
Yes!
Although for a string input, use the 's' option:
A=input('please insert your name','s')
For what it’s worth, I prefer the inputdlg function to input.

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by