isvector
check if a variable is a vector
Syntax
t=isvector(x)
Arguments
- x
vector or matrix
- t
a boolean
Description
isvector(x)
returns true if x
is a scalar (all dimensions equal to 1) or
is a vector (only one dimension not equal to 1).
Examples
isvector(ones(10,1)) isvector(1)
History
Version | Description |
2025.0.0 | isvector(x) now returns true if x is a scalar. |
Report an issue | ||
<< issquare | is<forme> | cat >> |