Documentation Center

  • Trial Software
  • Product Updates

Function Summary

MATLAB® provides these functions for working with numeric classes:

Integer Functions

Function

Description

int8, int16, int32, int64

Convert to signed 1-, 2-, 4-, or 8-byte integer.

uint8, uint16, uint32, uint64

Convert to unsigned 1-, 2-, 4-, or 8-byte integer.

ceil

Round towards plus infinity to nearest integer

class

Return the data type of an object.

fix

Round towards zero to nearest integer

floor

Round towards minus infinity to nearest integer

isa

Determine if input value has the specified data type.

isinteger

Determine if input value is an integer array.

isnumeric

Determine if input value is a numeric array.

round

Round towards the nearest integer

Floating-Point Functions

Function

Description

double

Convert to double precision.

single

Convert to single precision.

class

Return the data type of an object.

isa

Determine if input value has the specified data type.

isfloat

Determine if input value is a floating-point array.

isnumeric

Determine if input value is a numeric array.

eps

Return the floating-point relative accuracy. This value is the tolerance MATLAB uses in its calculations.

realmax

Return the largest floating-point number your computer can represent.

realmin

Return the smallest floating-point number your computer can represent.

Complex Number Functions

Function

Description

complex

Construct complex data from real and imaginary components.

i or j

Return the imaginary unit used in constructing complex data.

real

Return the real part of a complex number.

imag

Return the imaginary part of a complex number.

isreal

Determine if a number is real or imaginary.

Infinity and NaN Functions

Function

Description

inf

Return the IEEE® value for infinity.

isnan

Detect NaN elements of an array.

isinf

Detect infinite elements of an array.

isfinite

Detect finite elements of an array.

nan

Return the IEEE value for Not a Number.

Class Identification Functions

Function

Description

class

Return data type (or class).

isa

Determine if input value is of the specified data type.

isfloat

Determine if input value is a floating-point array.

isinteger

Determine if input value is an integer array.

isnumeric

Determine if input value is a numeric array.

isreal

Determine if input value is real.

whos

Display the data type of input.

Output Formatting Functions

Function

Description

format

Control display format for output.

Was this topic helpful?