Documentation

isnumeric

Determine if input is numeric array

Syntax

tf = isnumeric(A)

Description

tf = isnumeric(A)returnstrueifAis a numeric array andfalseotherwise.

A numeric array is any of the following numeric types and any subclasses of those types:

MATLAB Numeric Types

Examples

These examples show the valuesisnumericreturns when passed specific types:

% pi returns a numeric valueisnumeric(pi) ans = 1% Complex numbers are numericisnumeric(3+7i) ans = 1% Integers are numericisnumeric(uint8(1:255)) ans = 1% isnumeric returns a logical valueisnumeric(isnumeric(pi)) ans = 0

Extended Capabilities

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

Introduced before R2006a

Was this topic helpful?