﻿功能:返回指定数据的整数部分

格式:Truncate(a)

说明:a可以为矩阵(此时对矩阵里的每个元素进行操作),也可以为数字(此时对本数字进行操作)

PS:注意本函数与{RoundDown<矩阵运算\RoundDown>}、{Round<矩阵运算\Round>}、{RoundZero<矩阵运算\RoundZero>}、{RoundUp<矩阵运算\RoundUp>}的区别

例子:
x =
 [ -3.6   4.5   6
    0    -5    -9.8 ]
truncate(x)//回车后得到如下结果
ans =
 [ -3   4   6
    0  -5  -9 ]