dash.assert.additiveIndexCollection

Throw error if input is not a collection of additive indices


Syntax



Description

dash.assert.additiveIndexCollection(indices, nDims)

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.

dash.assert.additiveIndexCollection(indices, nDims, dimNames, header)

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