dash.assert.strlist
Throw error if input is not a string vector, cellstring vector, or char row vector
Syntax
Description
Checks if input is a string vector, cellstring vector, or char row vector. If so, returns the input as a string vector. If not, throws an error.
Use a custom name to refer to variable in the error message.
Use a custom header for thrown error IDs.
Input Arguments
input
any data type
The input being tested
name
string scalar
The name of the input in the calling function. Default is “input”
idHeader
string scalar
A header for thrown error IDs. Default is “DASH:assert:strlist”
Output Arguments
list
string vector
The input converted to string data type