iscolumn - Determine if input is column vector - MATLAB (original) (raw)
Main Content
Determine if input is column vector
Syntax
Description
`tf` = iscolumn([V](#mw%5F6e34a7c2-3c68-4ce4-8731-89e6bb0a45f4))
returns logical 1
(true
) if V
is a column vector. Otherwise, it returns logical 0
(false
). A column vector is a two-dimensional array that has a size of N-by-1, where N is a nonnegative integer.
Examples
Create a vector. Determine if it is a column vector.
V = rand(5,1); tf = iscolumn(V)
Find the conjugate transpose of the vector. Determine if it is a column vector.
Vt = V'; tf = iscolumn(Vt)
Create a scalar, which is a 1-by-1 array.
Determine if the scalar V
is also a column vector.
Create an array of characters. Determine if it is a column vector.
V = 'Hello, World!'; tf = iscolumn(V)
Check the dimension of V
by using size
. V
is a 1-by-13 character vector, which is not a column vector.
Now create a string scalar by enclosing a piece of text in double quotes.
Check if the scalar V
is also a column vector.
Input Arguments
Input array, specified as a scalar, vector, matrix, or multidimensional array.
Algorithms
- If the input array
V
has more than two dimensions, theniscolumn(V)
returns logical0
(false
). For example, an array of size N-by-1-by-2 is not a column vector.
Extended Capabilities
Theiscolumn
function fully supports tall arrays. For more information, see Tall Arrays.
The iscolumn
function fully supports GPU arrays. To run the function on a GPU, specify the input data as a gpuArray (Parallel Computing Toolbox). For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Version History
Introduced in R2010b