1、fix函数:向零方向取整

2、用法说明:y=fix(x) 函数将x中元素零方向取整,得到y是一个整数数组。对于复数z,分别对实部和虚部取整

3、举例说明

>> x = [1-2.9i 3+4.5i 5-6.7i 9-10.2i]

x =

   1.0000 - 2.9000i   3.0000 + 4.5000i   5.0000 - 6.7000i   9.0000 -10.2000i

>> y = fix(x)

y =

   1.0000 - 2.0000i   3.0000 + 4.0000i   5.0000 - 6.0000i   9.0000 -10.0000i
4、附录

>> help fix
 fix    Round towards zero.
    fix(X) rounds the elements of X to the nearest integers
    towards zero.
 
    See also floor, round, ceil.

    Overloaded methods:
       codistributed/fix
       gpuArray/fix

    Reference page in Help browser
       doc fix