Input array, specified as a scalar, vector, matrix, or multidimensional
array. For complex `X`

, `round`

treats
the real and imaginary parts independently.

`X`

must be `single`

or `double`

when
you use `round`

with more than one input.

`round`

converts logical and `char`

elements
of `X`

into `double`

values.

**Data Types: **`single`

| `double`

| `int8`

| `int16`

| `int32`

| `int64`

| `uint8`

| `uint16`

| `uint32`

| `uint64`

| `char`

| `logical`

**Complex Number Support: **Yes

Number of digits, specified as a scalar integer. When you specify `N`

,
the `round`

function rounds `X`

to
the nearest multiple of *10* ^{-N}.

If you specify the `'significant'`

rounding
type, then `N`

must be a positive integer.

Rounding type, specified as `'decimals'`

or `'significant'`

.
The rounding type determines whether `round`

considers
digits in relation to the decimal point or the overall number of significant
digits. `N`

must be a positive integer when you specify `'significant'`

.
In that case, the `round`

function rounds to the
nearest number with `N`

significant digits.

The default value is `'decimals'`

, so that `round(X,N,'decimals')`

is
equivalent to `round(X,N)`

.

**Example: **`round(3132,2,'significant')`

returns `3100`

,
which is the closest number to `3132`

that has `2`

significant
digits.

**Data Types: **`char`

Input duration, specified as a `duration`

array.

Unit of time, specified as `'seconds'`

, `'minutes'`

, `'hours'`

,
or `'days'`

.