Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

isvector

Determine whether input is vector

Syntax

isvector(A)

Description

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

Examples

Test matrix A and its row and column vectors:

A = rand(5);

isvector(A)
ans =
     0

isvector(A(3, :))
ans =
     1

isvector(A(:, 2))
ans =
     1

More About

collapse all

Tall Array Support

This function fully supports tall arrays. For more information, see Tall Arrays.

Introduced before R2006a

Was this topic helpful?