round
Round fi
object toward nearest integer or round input data using
quantizer
object
Description
rounds
y
= round(a
)fi
object a
to the nearest integer. In the case of a
tie, round
rounds values to the nearest integer with greater absolute
value. The rounded value is returned in fi
object
y
.
Examples
Input Arguments
Algorithms
y
anda
have the samefimath
object andDataType
property.When the
DataType
property ofa
issingle
,double
, orboolean
, thenumerictype
ofy
is the same as that ofa
.When the fraction length of
a
is zero or negative,a
is already an integer, and thenumerictype
ofy
is the same as that ofa
.When the fraction length of
a
is positive, the fraction length ofy
is0
, its sign is the same as that ofa
, and its word length is the difference between the word length and the fraction length ofa
, plus one bit. Ifa
is signed, then the minimum word length ofy
is2
. Ifa
is unsigned, then the minimum word length ofy
is1
.
Extended Capabilities
Version History
Introduced before R2006a