Image Processing Toolbox User's Guide Previous page   Next Page
iptcheckhandle

Check validity of handle

Syntax

Description

iptcheckhandle(H,valid_types,func_name,var_name,arg_pos) checks the validity of the handle H and issues a formatted error message if the handle is invalid. H must be a handle to a single figure, uipanel, hggroup, axes, or image object.

valid_types is a cell array of strings specifying the set of Handle Graphics object types to which H is expected to belong. For example, if you specify valid_types as {'uipanel','figure'}, H can be a handle to either a uipanel object or a figure object.

func_name is a string that specifies the name used in the formatted error message to identify the function checking the handle.

var_name is a string that specifies the name used in the formatted error message to identify the argument being checked.

arg_pos is a positive integer that indicates the position of the argument being checked in the function argument list. iptcheckhandle converts this value to an ordinal number and includes this information in the formatted error message.

Example

To trigger the error message, create a figure that does not contain an axes object and then check for a valid axes handle.

The following shows the format of the error message and indicates which parts you can customize using iptcheckhandle arguments.

See Also

iptcheckinput, iptcheckmap, iptchecknargin, iptcheckstrs, iptnum2ordinal


Previous page  iptcheckconn iptcheckinput Next page

© 1994-2005 The MathWorks, Inc.