Documentation Center

  • Trials
  • Product Updates

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

See Also

| | |

Was this topic helpful?