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.

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

collapse all

M = rand(3,3,3);
ismatrix(M)
ans = logical
   0

N = M(:,:);
ismatrix(N)
ans = logical
   1

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2010b

Was this topic helpful?