Matlab中的取整函数

在对数据进行处理时,有时我们需要对含有小数的数据进行取整处理,在matlab里面常用的几种取整函数,fix、round、floor、ceil

fix函数-向零方向取整。()(Round towards zero)
round函数-向最近的方向取整(四舍五入)。(Round towards nearest integer)
floor函数-向负无穷大方向取整。 (Round towards minus infinity)
ceil函数-向正无穷大方向取整。(ceil Round towards plus infinity)

发布了77 篇原创文章 · 获赞 23 · 访问量 7562

猜你喜欢

转载自blog.csdn.net/Hots3y/article/details/98721187
今日推荐