Matlab中的取整-floor,ceil,fix,round

时间:2022-09-18 20:37:41

FLOOR Round towards minus infinity.

FLOOR(X) rounds the elements of X to the nearest integers
towards minus infinity.

CEIL Round towards plus infinity.

CEIL(X) rounds the elements of X to the nearest integers
towards infinity.

FIX Round towards zero.

FIX(X) rounds the elements of X to the nearest integers
towards zero.

ROUND Round towards nearest integer.

ROUND(X) rounds the elements of X to the nearest integers.