msgbox
Create message dialog box
Syntax
Description
Note
In App Designer and apps created with the uifigure
function,
uialert
is recommended over msgbox
because it provides
additional customization options.
creates a message dialog box that automatically wraps f
= msgbox(message
)message
to fit an
appropriately sized figure.
Use this function if you want to show a message 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.
specifies the window mode for the dialog box. Alternatively, you can specify a structure array
that specifies the window mode and the interpreter for the f
= msgbox(___,createmode
)message
.
Examples
Input Arguments
Output Arguments
More About
Tips
Modal dialogs (created using
errordlg
,msgbox
, orwarndlg
) replace any existing dialogs created with these functions that also have the same name.Program execution continues even when a modal dialog box is active. To block MATLAB program execution until the user responds to the modal dialog box, use the
uiwait
function.To create a modal alert dialog box for single-window App Designer or
uifigure
-based apps, use theuialert
function instead.
Version History
Introduced before R2006a