round

Purpose

Round to the nearest integer.

Format

y = round(x)
Parameters:x (NxK matrix or N-dimensional array) – data
Returns:y (NxK matrix or N-dimensional array) – contains the rounded elements of x.

Examples

x = { 77.68 -14.10,
       4.73 -158.88 };
y = round(x);
print y;
78.00  -14.00
 5.00 -159.00

See also

Functions trunc(), floor(), ceil()