FUNCTION REFERENCE

questdlg

Ask a question with up to three buttons.

Ask a question with up to three buttons.

Syntax

answer = questdlg(quest, title)

Syntax

answer = questdlg(quest, title, defbtn)

Syntax

answer = questdlg(quest, title, btn1, btn2, defbtn)

Syntax

answer = questdlg(quest, title, btn1, btn2, btn3, defbtn)

Without button names the buttons are Yes, No and Cancel and Yes is the default. The last argument names the default button (Enter chooses it). answer is the text of the clicked button, or '' when the dialog is closed or Escape is pressed. Needs the desktop app.

Example

b = questdlg('Overwrite the file?', 'Confirm', 'Overwrite', 'Keep', 'Keep');

Differences from MATLAB: Of an options structure as the last argument only the Default field is used.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.