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.

isnumeric

Determine if input is numeric array

Syntax

tf = isnumeric(A)

Description

tf = isnumeric(A) returns true if A is a numeric array and false otherwise.

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

 MATLAB Numeric Types

Examples

These examples show the values isnumeric returns when passed specific types:

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

Introduced before R2006a

Was this topic helpful?