向零取整

fix: Round toward zero
例:fix(2.1) 结果为 2

向下取整

floor: Round toward negative infinity
例:floor(2.1) 结果为 2
例:floor(-2.1) 结果为-3

向上取整

ceil: Round toward positive infinity
例:ceil(2.1) 结果为 3

四舍五入

round: Round to nearest decimal or integer
例:

1
2
X = [2.11 3.5; -3.5 0.78];
Y = round(X)

结果为
Y = 2×2
2 4
-4 1