Documentation

This is machine translation

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

ismatrix

Determine whether input is matrix

Syntax

ismatrix(V)

Description

ismatrix(V) returns logical 1 (true) if size(V) returns [m n] with nonnegative integer values m and n, and logical 0 (false) otherwise.

Examples

Create three vectors:

V1 = rand(5,1);
V2 = rand(5,1);
V3 = rand(5,1);

Concatenate the vectors and check that the result is a matrix. ismatrix returns 1:

M = cat(2,V1,V2,V3);
ismatrix(M)
ans =
     1

More About

collapse all

Tall Array Support

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

Was this topic helpful?