round

Purpose

Round to nearest integers.

Synopsis

Y = round(X)

Description

round(X) rounds the elements of X to the nearest integers.

Examples

X = [-1.9  -0.2  3.4  5.6  7.0]
round(X) =[-2  0  3  6  7]

See Also

ceil, fix, floor

(c) Copyright 1994 by The MathWorks, Inc.