How can I insert a separate line of text with inputdlg?

9 views (last 30 days)
Hi all!
Some help needed with the inputdlg option. I want to pose options on 3 variables in one dialog box, but all have one overlapping question. Is it possible to insert an enter in the first question, so that it looks like that is the main one? So something like this:
Please fill in the following variables
Age
[______________]
Height
[______________]
Weight
[______________]
I currently have the top line of text as title of the dialog box, but I believe it would be clearer if it was inside.
Thanks! ~ Judith

Answers (2)

KSSV
KSSV on 15 Jul 2020
  1 Comment
Judith Voortman
Judith Voortman on 15 Jul 2020
I may not read right, but I couldn't figure out from that links how to get an enter in my question ... Have been looking in that link indeed.

Sign in to comment.


Star Strider
Star Strider on 15 Jul 2020
Try this:
dlgtitle = 'Please fill in the following variables: ';
prompt = {'Age','Height','Weight'};
vc = inputdlg(prompt, dlgtitle, [1 60]);
v = str2double(vc);
.

Categories

Find more on Construct and Work with Object Arrays in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!