Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

Identifying Numeric Classes

You can check the data type of a variable x using any of these commands.

Command

Operation

whos x

Display the data type of x.

xType = class(x);

Assign the data type of x to a variable.

isnumeric(x)

Determine if x is a numeric type.

isa(x, 'integer')
isa(x, 'uint64')
isa(x, 'float')
isa(x, 'double')
isa(x, 'single')

Determine if x is the specified numeric type. (Examples for any integer, unsigned 64-bit integer, any floating point, double precision, and single precision are shown here).

isreal(x)

Determine if x is real or complex.

isnan(x)

Determine if x is Not a Number (NaN).

isinf(x)

Determine if x is infinite.

isfinite(x)

Determine if x is finite.

Was this topic helpful?