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
Determine Row Vector
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.
Determine Row Vector from Scalar
Create a scalar, which is a 1-by-1 array.
Determine if the scalar V
is also a row vector.
Determine Row Vector from Character Vector and String Scalar
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
V
— Input array
scalar | vector | matrix | multidimensional array
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
Tall Arrays
Calculate with arrays that have more rows than fit in memory.
Theisrow
function fully supports tall arrays. For more information, see Tall Arrays.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
HDL Code Generation
Generate VHDL, Verilog and SystemVerilog code for FPGA and ASIC designs using HDL Coder™.
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool
or accelerate code with Parallel Computing Toolbox™ ThreadPool
.
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
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).
Distributed Arrays
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).
Version History
Introduced in R2010b