Create warning dialog box
f = warndlg(
creates a nonmodal
warning dialog box with the specified message and returns the dialog box figure
object msg
)f
. The message text wraps to fit the dialog box. The
dialog box title is Warning Dialog
.
Use the warndlg
function if you want to show a warning dialog
box over multiple app windows, the MATLAB® desktop, or Simulink® and still be able to interact with them before responding to the
dialog box.
f = warndlg
creates a warning dialog box with a default title
and message, as follows.
Default title: Warning Dialog
Default message: This is the default
warning.
Modal
dialogs (created using errordlg
, msgbox
, or warndlg
)
replace any existing dialogs created with these functions that also
have the same name.
MATLAB program execution continues
even when a modal Warning dialog box is active. To block program execution until
the user closes the dialog box, use the uiwait
function.
To create a modal
alert dialog box for single-window App Designer or
uifigure
-based apps, use the uialert
function
instead.