FUNCTION REFERENCE

parse

Parse function inputs with an inputParser.

Parse function inputs with an inputParser.

Syntax

parse(p, args...)

Fills p.Results (fields sorted by name), p.UsingDefaults and, with KeepUnmatched, p.Unmatched. Each parse starts again from the defaults. With StructExpand set, a scalar struct argument supplies name-value pairs. Errors name FunctionName when it is set.

Example

p = inputParser; p.addRequired('a'); p.addParameter('b', 0); p.parse(1); p.UsingDefaults   % {'b'}

Differences from MATLAB: none known.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.