Round

Rounds x to the nearest integer. It is performed element-wise if x is a vector, matrix or signal.

The round(x, d) function rounds x to digit d (d will be converted to an integer). For a negative value of d, x is rounded to the next power of 10, for example round(34, -1) returns 30. This function is performed element-wise if x is a vector, matrix or signal.

Syntax

round(x [, d])

Types
 Variable NameValue TypeVariable Type
Argument:xreal, complexscalar, vector, matrix, signal, xy-data
Optional:drealscalar
Result:  real, complex scalar, vector, matrix, signal, xy-data
Calculator Input

Use the round button to complete the operation.

Example
IDDescriptionTypeValueExpression
xArgumentREAL VECTOR

[2.49,2.5]
v1 Result REAL VECTOR

round(x)
v2 Result REAL VECTOR

round(x,1)