Main Content

# isrow

Determine if input is row vector

## Syntax

``tf = isrow(V)``

## Description

example

````tf = isrow(V)` 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

collapse all

Create a vector. Determine if it is a row vector.

```V = rand(5,1); tf = isrow(V)```
```tf = logical 0 ```

Find the conjugate transpose of the vector. Determine if it is a row vector.

```Vt = V'; tf = isrow(Vt)```
```tf = logical 1 ```

Create a scalar, which is a 1-by-1 array.

`V = 5;`

Determine if the scalar `V` is also a row vector.

`tf = isrow(V)`
```tf = logical 1 ```

Create an array of characters. Determine if it is a row vector.

```V = 'Hello, World!'; tf = isrow(V)```
```tf = logical 1 ```

Check the dimension of `V` by using `size`. `V` is a 1-by-13 character vector, which is also a row vector.

`sz = size(V)`
```sz = 1×2 1 13 ```

Now create a string scalar by enclosing a piece of text in double quotes.

`V = "Hello, World!";`

Check if the scalar `V` is also a row vector.

`tf = isrow(V)`
```tf = logical 1 ```

## Input Arguments

collapse all

Input array, specified as a scalar, vector, matrix, or multidimensional array.

## Algorithms

• If the input array `V` has more than two dimensions, then `isrow(V)` returns logical `0` (`false`). For example, an array of size 1-by-1-by-N is not a row vector.

## Version History

Introduced in R2010b