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

Check validity of option string

Syntax

Description

out=iptcheckstrs(in,valid_strs,func_name,var_name,arg_pos) checks the validity of the option string in. It returns the matching string in valid_strs in out. iptcheckstrs looks for a case-insensitive, nonambiguous match between in and the strings in valid_strs.

valid_strs is a cell array containing strings.

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

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. iptcheckstrs converts this value to an ordinal number and includes this information in the formatted error message.

Example

To trigger this error message, define a cell array of some text strings and pass in another string that isn't in the cell array.

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

See Also

iptcheckhandle, iptcheckinput, iptcheckmap, iptchecknargin, iptnum2ordinal


Previous page  iptchecknargin iptdemos Next page

© 1994-2005 The MathWorks, Inc.