fix

Purpose

Round towards zero.

Synopsis

Y = fix(X)

Description

fix(X) rounds the elements of X to integers by eliminating the fractional part.

Examples

X  =  [-1.9  -0.2  3.4  5.6  7.0]
fix(X)  =  [-1  0  3  5  7]

See Also

ceil, floor, round

(c) Copyright 1994 by The MathWorks, Inc.