name – Name of argument
The name of the input or output argument, specified as a JSON string. This property and
value is required. The name property does not need to match the argument name in the
source code, but it is a best practice for it to match any help or documentation.
Example: "name":"myArgumentName"
kind – Kind of argument
The kind of argument, specified as a JSON string with one of the following values.
MATLAB uses the value of the kind property to determine if and when to display the
arguments within the function signature.
Value Description
required Argument is required, and its location is relative to other required
arguments in the signature object.
ordered Argument is optional, and its location is relative to the required and
preceding optional arguments in the signature object.
namevalue Argument is an optional name-value pair. Name-value pair arguments
occur at the end of a function signature, but the pairs can be specified
in any order.
Arguments that are required and ordered appear first in the function signature, and
are followed by any namevalue arguments.
required, ordered, and namevalue arguments are most common. You can also specify
the following values for kind.
- positional – Argument is optional if it occurs at the end of the argument list, but
becomes required to specify a subsequent positional argument. Any positional
arguments must appear with the required and ordered arguments, before any
namevalue arguments. - flag – Argument is an optional, constant string, typically used as a switch. For
example, 'ascend' or 'descend'. Flags occur at the end of a function signature. All
flag arguments must appear before any namevalue arguments. - properties – Argument is optional and is used to specify public, settable properties
of a different MATLAB class. Indicate the class using the argument object type
property. In code suggestions, these properties appear as name-value pairs. Any
properties arguments must be the last argument in the signature.
30 Custom Help and Documentation