matlab中几种取整函数的用法(fix, floor, ceil, round)
2017-08-02 16:38
417 查看
matlab中有以下几种取整函数:fix, floor, ceil, round,它们的区别如下
fix:朝0方向取整,如:
floor:朝负无穷方向取整,如:
ceil:朝正无穷方向取整,如:
round:四舍五入到最近的整数,如:
fix:朝0方向取整,如:
>>fix(2.8) = 2 >>fix(-2.8) = -2
floor:朝负无穷方向取整,如:
>>floor(2.8) = 2 >>floor(-2.8) = -3
ceil:朝正无穷方向取整,如:
>>ceil(2.8) = 3 >>ceil(-2.8) = -2
round:四舍五入到最近的整数,如:
>>round(2.8) = 3 >>round(-2.8) = -3
相关文章推荐
- MATLAB中取整函数(fix, floor, ceil, round)的使用
- MATLAB中取整函数(fix, floor, ceil, round)的使用
- matlab中的取整函数,round,fix,floor,ceil
- matlab 关于取整函数 fix, floor, ceil, round
- MATLAB取整函数:fix, floor, ceil, round
- matlab 四种取整函数(fix floor ceil round)的区别
- MATLAB中取整函数(fix, floor, ceil, round)的使用
- paper 68 :MATLAB中取整函数(fix, floor, ceil, round)的使用
- MATLAB的取整函数:fix(x),floor(x),ceil(x),round(x)
- MATLAB中取整函数(fix, floor, ceil, round)的使用
- MATLAB中取整函数(fix, floor, ceil, round)的使用
- MATLAB的取整函数:fix(x), floor(x) :,ceil(x) , round(x)
- MATLAB的取整函数:fix(x), floor(x) ,ceil(x) , round(x)
- Matlab取整函数:fix, floor, ceil, round的具体应用方法
- Matlab取整函数(fix, floor, ceil, round)的使用
- MATLAB中取整函数(fix, floor, ceil, round)的使用
- 【转】 MATLAB中取整函数(fix, floor, ceil, round)的使用
- matlab中的 fix, floor, ceil, round的用法
- MATLAB中取整函数(fix, floor, ceil, round)的使用
- MATLAB中取整函数——【fix, floor, ceil, round】的使用