Determine whether input is column vector
iscolumn(V)
iscolumn(
returns
logical 1 (V
)true
) if size
(V
)
returns [n 1]
with a nonnegative integer value n
,
and logical 0 (false
) otherwise.
Determine if a vector is a column. This example is a row so iscolumn
returns
0:
V = rand(1,5); iscolumn(V) ans = 0
Transpose the vector to make it a column. iscolumn
returns
1:
V1 = V'; iscolumn(V1) ans = 1