isnumeric

Return true if variable var is a numeric array.

Syntax

  • res = isnumeric(var)

Input argument

  • var - a variable

Output argument

  • res - a logical: true or false

Description

isnumeric returns a logical 1 if the argument is a numeric array and a logical 0 otherwise.

List of numeric types:

single : single precision

double : double precision

int8 : 8 bit signed integer

int16 : 16 bit signed integer

int32 : 32 bit signed integer

int64 : 64 bit signed integer

uint8 : 8 bit unsigned integer

uint16 : 16 bit unsigned integer

uint32 : 32 bit unsigned integer

uint64 : 64 bit unsigned integer

Examples

A = 1;
res = isnumeric(A)
B = single(1+i);
res = isnumeric(B)
C = logical(1);
res = isnumeric(C)

See also

islogical, isinteger, isdouble, issingle.

History

Version
Description

1.0.0

initial version

Author

Allan CORNET

Last updated