소수/실수를 정수로 바꾸고자할때 세가지 방법이 있습니다.

반올림(round), 올림(ceil), 내림(floor)

사용방법은 간단합니다.

>> round(2.5)

ans =

     3

>> ceil(2.5)

ans =

     3

>> floor(2.5)

ans =

     2


Posted by leeyongwan
,