dash.parse.vararginFlags

Parse flags from varargin


Syntax



Description

flags = dash.parse.vararginFlags(inputs)

Parses a cell vector of flags into a string vector. Throws error if any elements are not flags.

flags = dash.parse.vararginFlags(inputs, spacing)

Parses a cell vector of values with flags beginning on the first element, and spaced with a given spacing.

flags = dash.parse.vararginFlags(inputs, spacing, nPrevious, header)

Customize error messages and IDs.


Input Arguments

inputs

cell vector
The varargin being parsed

spacing

scalar positive integer
The spacing of flags along varargin

nPrevious

scalar positive integer
The number of inputs before varargin in the calling function. (Ignoring object reference in class methods.

Output Arguments

flags

string vector
The ordered list of flags.