isrow - Determine if input is row vector - MATLAB (original) (raw)
Main Content
Determine if input is row vector
Syntax
Description
`tf` = isrow([V](#mw%5Faacabd8d-c588-4d67-b528-279b83b91cb3))
returns logical 1
(true
) if V
is a row vector. Otherwise, it returns logical 0
(false
). A row vector is a two-dimensional array that has a size of 1-by-N, where N is a nonnegative integer.
Examples
Create a vector. Determine if it is a row vector.
V = rand(5,1); tf = isrow(V)
Find the conjugate transpose of the vector. Determine if it is a row vector.
Create a scalar, which is a 1-by-1 array.
Determine if the scalar V
is also a row vector.
Create an array of characters. Determine if it is a row vector.
V = 'Hello, World!'; tf = isrow(V)
Check the dimension of V
by using size
. V
is a 1-by-13 character vector, which is also a row vector.
Now create a string scalar by enclosing a piece of text in double quotes.
Check if the scalar V
is also a row 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, thenisrow(V)
returns logical0
(false
). For example, an array of size 1-by-1-by-N is not a row vector.
Extended Capabilities
Theisrow
function fully supports tall arrays. For more information, see Tall Arrays.
The isrow
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