﻿功能:返回不小于指定数据的最小整数(向上取整)

格式:RoundUp(a)

说明:a为一个数据,或者a为一个矩阵变量.其表示的含义是返回不小于a的最小整数.

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

例子:

a =
[ 78.3526250991750     51.9998617246746     90.0043900543844
  54.1329650460430     24.2359996886160     4.70177750322119
  37.2891209727568     37.4321053444557     38.2910862277686
  33.9156034560481     21.8258979366282     7.78503828113202 ]

RoundUp(a)//回车后得到如下的结果
ans =
[ 79.0000000000000     52.0000000000000     91.0000000000000
  55.0000000000000     25.0000000000000     5.00000000000000
  38.0000000000000     38.0000000000000     39.0000000000000
  34.0000000000000     22.0000000000000     8.00000000000000 ]

RoundUp(12.3)//回车后得到如下的结果
ans =
[ 13.0000000000000 ]

//By 2012/3/4