dash.assert.vectorTypeN
Throws error if input is not a vector of a specified format
Syntax
Description
Checks if an input is a vector of the required data type and length. If not, throws an error
Use a custom name to refer to the input in error messages.
Use a custom header for thrown error IDs.
Input Arguments
input
any data type
The input being tested
types
string vector | []
The allowed data types of the input. Use an empty array to allow any type
length
scalar positive integer | [] | NaN
The required length of the vector. Use an empty array or NaN to allow any length
name
string scalar
The name of the input in the calling function for use in error messages. Default is “input”
idHeader
string scalar
Header for thrown error IDs. Default is “DASH:assert:vectorTypeN”