dash.assert.additiveIndices
Throw error if input is not a vector of additive indices
Syntax
Description
Checks if input is a vector of integers (or empty numeric array). If not, throws an error. If so returns the input and converts empty arrays to true empty.
Customize thrown error messages and IDs.
Input Arguments
indices
any data type
The input being tested
name
string scalar
The name to use for the input in error messages
header
string scalar
Header for thrown error IDs.
Output Arguments
indices
vector, integers | []
The additive indices