<< rootmusic | FOSSEE_Signal_Processing_Toolbox | rssq >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > roundn

# roundn

Round a number to a specified number of decimal places.

### Syntax

    r = roundn(x, n)

### Parameters

x:

  Input number or array.

n:

  Number of decimal places to round to.

r:

  Rounded number or array.

### Description

The `roundn` function rounds the input `x` to `n` decimal places.

### Examples

    // Round a number to 2 decimal places:
    r = roundn(3.14159, 2)

Report an issue
<< rootmusic | FOSSEE_Signal_Processing_Toolbox | rssq >>