Round toward zero
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 as floor
.
For negative numbers, the behavior of fix
is the
same as ceil
.