isrow
Tests whether the input is a row vector.
Category: Language Fundamentals > Matrices and Arrays
Syntax
tf = isrow(A)
True when A is 1-by-n with n of any size, including 0 or 1.
Description
A scalar is a row, and so is the empty 1-by-0 array. A column of length 2 or more is not. Use isvector to accept either orientation.
Input arguments
A- Any array.
Output arguments
tf- Logical scalar.
Example
isrow([1 2 3])
isrow([1; 2; 3])
isrow(7)
Output
ans = logical
1
ans = logical
0
ans = logical
1