Example: "kind":"required" or "kind":"namevalue"
type – Class and/or attributes of argument
Class or attributes of the argument, specified as a JSON string, list, or list of lists.
The type property can define what class the argument is and what attributes the
argument must have.
- To match one class or attribute, use a single JSON string. For example, if an argument
must be numeric, then specify "type":"numeric". - To match all classes or attributes, use a list of JSON strings. For example, if an
argument must be both numeric and positive, then specify "type":["numeric",
">=0"]. - To match any of multiple classes or attributes, use a list of lists of JSON strings. For
the inner lists, MATLAB uses a logical AND of the values. For the outer list, MATLAB
uses a logical OR of the values. For example, if an argument must be either a positive
number or a containers.Map object, then specify "type":[["numeric",
">=0"],["containers.Map"]].
Value Argument Description
"classname" Must be an object of class classname, where classname is the
name of the class returned by the class function. For example,
"double" or "function_handle".
"choices=express
ion"
Must be a case-insensitive match to one of the specified choices.
expression is any valid MATLAB expression that returns a cell of
character vectors, string array, or cell of integer values. For
example, "choices={'on','off'}" or "choices={8, 16,
24}".
expression can refer by name to other input arguments that
appear in the argument list. Since expression is evaluated at run
time, allowable choices can vary dynamically with the value of
other input arguments.
"file=*.ext,..." Must be a string or character vector that names an existing file
with the specified extension. File names are relative to the current
working folder. For example, to allow all .m and .mlx files in the
current folder, use "file=*.m,*.mlx". To match all files in the
current folder, use "file".
Customize Code Suggestions and Completions