warndlg
Create warning dialog box
Description
Note
uialert is recommended over
warndlg because it provides additional
customization options.
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 DialogDefault message:
This is the default warning.
Examples
Input Arguments
More About
Tips
Modal dialog boxes (created using
errordlg,msgbox, orwarndlg) replace any existing dialog boxes 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
uiwaitfunction.To create a modal alert dialog box for single-window App Designer or
uifigure-based apps, use theuialertfunction instead.
Version History
Introduced before R2006a

