matlab中fix()干什么用的

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/19 04:20:40

matlab中fix()干什么用的

FIX(X) rounds the elements of X to the nearest integers towards zero.
向0靠拢取整,例:
>> fix(3.2)
ans =
3
>> fix(3.7)
ans =
3
>> fix(-3.7)
ans =
-3
>> fix(-3.2)
ans =
-3