首页 > 其他 > 详细

MATLAB中floor、round、ceil、fix区别

时间:2014-03-20 13:28:53      阅读:444      评论:0      收藏:0      [点我收藏+]

MATLAB中floor、round、ceil、fix区别

B = floor(A) rounds the elements of A to the nearest integers less than or equal to A. For complex A, the imaginary and real parts are rounded independently.   (floor:朝负无穷方向舍入)

 

B = ceil(A) rounds the elements of A to the nearest integers greater than or equal to A. For complex A, the imaginary and real parts are rounded independently. (ceil:朝正无穷方向舍入)

 

B = fix(A) rounds the elements of A toward zero, resulting in an array of integers. For complex A, the imaginary and real parts are rounded independently. (fix:朝零方向舍入 )

 

B = round(A) rounds the elements of X to the nearest integers. For complex X, the imaginary and real parts are rounded independently. (round:四舍五入)

MATLAB中floor、round、ceil、fix区别,布布扣,bubuko.com

MATLAB中floor、round、ceil、fix区别

原文:http://www.cnblogs.com/wjgaas/p/3613392.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!