msgbox
Creates a message dialog box.
📝Syntax
h = msgbox(message)
h = msgbox(message, title)
h = msgbox(message, title, icon)
h = msgbox(message, title, icon, mode)
h = msgbox(message, mode)
📥Input Arguments
Parameter Description
message Message text. Use a character vector, string array, or cell array of character vectors for multiple lines.
📤Output Arguments
Parameter Description
h Graphics figure handle.
📄Description

msgbox creates a message dialog and returns a graphics figure handle. The handle can be used with get, set, close, delete, and waitfor.

💡Examples
Create a message box.
h = msgbox({'Operation', 'completed'}, 'Status', 'help', 'non-modal');
Example illustration
Create a plain message box.
h = msgbox('Ready.', 'Status', 'none', 'non-modal');
close(h)
🔗See Also
helpdlgwarndlgerrordlgquestdlg
🕔Version History
Version Description
2.0.0 Updated dialog API help.
Edit this page on GitHub