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

warndlg creates a warning message dialog and returns a graphics figure handle.

💡Examples
Create a warning dialog.
f = warndlg('Check the input value.', 'Warning', 'non-modal');
drawnow();
Example illustration
Create a warning dialog with several lines.
h = warndlg({'Input is empty.', 'Default values will be used.'}, 'Warning', 'non-modal');
close(h)
🔗See Also
msgboxhelpdlgerrordlg
🕔Version History
Version Description
2.0.0 Updated dialog API help.
Edit this page on GitHub