dash.assert.additiveIndices

Throw error if input is not a vector of additive indices


Syntax



Description

indices = dash.assert.additiveIndices(indices)

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.

indices = dash.assert.additiveIndices(indices, name, header)

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

Output Arguments

indices

vector, integers | []
The additive indices