Skip to Main Content Skip to Search
Product Documentation

iscolumn - Determine whether input is column vector

Syntax

iscolumn(V)

Description

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

Examples

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

See Also

ismatrix | isrow | isscalar | isvector

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


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