| MATLAB Functions | Help Desk |
inputdlg
Create input dialoganswer = inputdlg(prompt) answer = inputdlg(prompt,title) answer = inputdlg(prompt,title,lineNo) answer = inputdlg(prompt,title,lineNo,defAns)
answer = inputdlg(prompt)
creates a modal dialog box and returns user input for multiple prompts in the cell array answer. prompt is a cell array containing prompt strings.
answer = inputdlg(prompt,title)
specifies a title for the dialog.
answer = inputdlg(prompt,title,lineNo)
specifies the number of lines for each answer in lineNo, which is a scalar value applying to all prompts, or a vector having one element per prompt.
answer = inputdlg(prompt,title,lineNo,defAns)
specifies the default answer to display for each question. defAns must contain the same number of elements as prompt.
Create an input dialog to input an integer and colormap name:
prompt = {'Enter the size of the matrix','Enter colormap name'};
def = {20,'hsv'}
title = 'Input for peaks function'
lineNo = 1;
answer = inputdlg(prompt,title,lineNo,def);
textwrap, dialog, warndlg, helpdlg, questdlg, errdlg