fix
Round toward zero
Syntax
Description
Y = fix(
rounds each element of
X
)X
to the nearest integer toward zero. This operation
effectively truncates the numbers in X
to integers by removing
the decimal portion of each number:
For positive numbers, the behavior of
fix
is the same asfloor
.For negative numbers, the behavior of
fix
is the same asceil
.