dash.parse.nameValueOrCollection

Parse inputs that are either Name,Value pairs, or collected Name,Value pairs


Syntax



Description

[names, values] = dash.parse.nameValueOrCollection(varargs)

Parse inputs that are either 1. A set of Name,Value inputs, or 2. A collection of Name,Value inputs in which names are organized in a string vector and values are organized in a cell vector. After parsing, returns names as a string vector and values as a cell vector.

= dash.parse.nameValueOrCollection(varargs, namesName, valuesName, extraInfo, header)

Customize thrown error messages and IDs.


Input Arguments

varargs

cell vector
The varargin input from the calling function.

namesName

string scalar
An identifying name for the names in error messages.

valuesName

string scalar
An identifying name for the values in error messages.

extraInfo

string scalar
Additional info about Name,Value pairs for error messages.

Output Arguments

names

string vector [nNames]
The names collected in a string vector

values

cell vector [nNames]
The values collected in a cell vector