<< number_properties Floating point Integer representation >>

Scilab help >> Elementary Functions > Floating point > round

round

round to nearest integer

Calling Sequence

y=round(x)

Arguments

x

real or complex matrix

y

integer or complex (with integer real and imag) matrix

Description

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

Examples

round([1.3 1.5 1.7 2.5 3.7])
// Notice the result for x negative
round([-1.3 -1.5 -1.7 -2.5 -3.7])

See Also

<< number_properties Floating point Integer representation >>