1)fix (N) rounding in the 0 direction , which is a class of functions applied to integer values, as in the previous study of the rounding problem, for example, Fix (PI) =3; fix ( -1.3) =-1; fix (1.3) =1;
2)round (n): rounded to the nearest integer, such as round ( -1.3) =-1;round ( -1.52) =-2;round (1.3) =1;round (1.52) =2;round(PI) =3 ; round (3.5) =4;round (-3.5) =-4;
Round (-3.1) =-3; This note differs from fix, pay attention to the distinction!
3Floor (n), as the name implies, is the flooring, so it is smaller than its whole number, that is, toward the negative infinity direction, such as floors (-1.3) =-2; Floor (1.3) =1;floor ( -1.8) =-2,floor (1.8) =1
Ceil function, in contrast to floor, it means the ceiling, that is, to take a larger than its smallest integer, that is, toward the positive infinity direction, such as ceil (-1.3) =-1; Ceil (1.3) =2;ceil ( -1.8) =-1,ceil (1.8) =2
4)ceil (n) means rounding in the positive direction, which is better differentiated with floor (n) rounding in the negative direction, for example:
Ceil (PI) =4; ceil (3.5) = 4; Ceil (-3.2) =-3; Rounding in the positive direction
Floor (PI) = 3; Floor (3.5) = 3; Floor (-3.2) =-4; rounding in negative direction
So it is easy to tell the difference, I hope we can distinguish;
Paper 11:matlab fix function, floor function, ceil function, round function distinction