dash.assert.additiveIndexCollection
Throw error if input is not a collection of additive indices
Syntax
Description
Requires indices to be a cell vector with one element per dimension. Each element must hold a vector of integers. If there is a single dimension, also allows indices to be a direct vector of integers. If these requirements are not met, throws an error.
Customize thrown error messages and IDs.
Input Arguments
indices
any data type
The input being checked
nDims
scalar positive integer
The number of dimensions being indexed
dimNames
string vector [nDims]
The name of each dimension being indexed
header
string scalar
Header for thrown error IDs.