FUNCTION REFERENCE
uiconfirm
Display a confirmation dialog box and return the selected option text.
Display a confirmation dialog box and return the selected option text.
Syntax
selection = uiconfirm(fig, message, title)Syntax
selection = uiconfirm(fig, message, title, Name, Value)Presents Options (default {'OK','Cancel'}) over fig with DefaultOption, CancelOption, Icon, CloseFcn, and Interpreter, returning the selected option text. In -batch mode returns the DefaultOption text without blocking and runs CloseFcn if given.
Example
fig = uifigure; s = uiconfirm(fig, 'Continue?', 'Confirm', 'Options', {'Yes','No'}, 'DefaultOption', 2); s; delete(fig)Differences from MATLAB: Custom image icon arrays and HTML interpreter are not supported; in -batch mode it always returns DefaultOption.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.