Skip to Main Content Skip to Search
Product Documentation

isrow - Determine whether input is row vector

Syntax

isrow(V)

Description

isrow(V) returns logical 1 (true) if size(V) returns [1 n] with a nonnegative integer value n, and logical 0 (false) otherwise.

Examples

Determine if a vector is a row. This example is a column so isrow returns 0:

V = rand(5,1);
isrow(V)
ans =
     0

Transpose the vector to make it a row. isrow returns 1:

V1 = V';
isrow(V1)
ans =
     1

See Also

iscolumn | ismatrix | isscalar | isvector

  


» Learn more
» Download free kit
» Get trial software

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS