MATLAB Functions Help Desk

errordlg

Purpose

Create and display an error dialog box

Syntax

Description

errordlg creates an error dialog box, or if the named dialog exists, errordlg pops the named dialog in front of other windows.

errordlg displays a dialog box named 'Error Dialog' and contains the string 'This is the default error string.'

errordlg('errorstring') displays a dialog box named 'Error Dialog' that contains the string 'errorstring'.

errordlg('errorstring','dlgname') displays a dialog box named 'dlgname' that contains the string 'errorstring'.

errordlg('errorstring','dlgname','on') specifies whether to replace an existing dialog box having the same name. 'on' brings an existing error dialog having the same name to the foreground. In this case, errordlg does not create a new dialog.

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

Remarks

MATLAB sizes the dialog box to fit the string 'errorstring'. The error dialog box has an OK pushbutton and remains on the screen until you press the OK button or the Return key. After pressing the button, the error dialog box disappears.

The appearance of the dialog box depends on the windowing system you use.

Examples

The function

displays the following dialog box on a UNIX system:

See Also

dialog, helpdlg, msgbox, questdlg, warndlg



[ Previous | Help Desk | Next ]