FUNCTION REFERENCE

mustBeVector

Validate that value is a vector.

Validate that value is a vector.

Syntax

mustBeVector(A); mustBeVector(A, 'allow-all-empties')

Throws an error if A is not a 1-by-n or n-by-1 vector (unless 'allow-all-empties' is passed and A is empty).

Example

mustBeVector([1 2 3])

Differences from MATLAB: None.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.