MATLAB Function Reference Previous page   Next Page
warndlg

Display warning dialog box

Syntax

Description

warndlg displays a dialog box named 'Warning Dialog' containing the string 'This is the default warning string.' The warning dialog box disappears after you press the OK button.

warndlg('warningstring') displays a dialog box with the title 'Warning Dialog' containing the string specified by warningstring.

warndlg('warningstring','dlgname') displays a dialog box with the title dlgname that contains the string warningstring.

h = warndlg(...) returns the handle of the dialog box.

Warnings with Multiple Lines

To use multiple lines in your warning, define warningstring using either of the following:

Examples

The statement

displays this dialog box:

See Also

warning, dialog, errordlg, helpdlg, msgbox

Predefined Dialog Boxes for related functions


Previous page  waitforbuttonpress warning Next page

© 1994-2005 The MathWorks, Inc.