asking matlab operation
조회 수: 3 (최근 30일)
이전 댓글 표시
hi, I got some problem about math operation
it's like this: 2/2=1 3/2=1.5 rounded up to 2 (so 3/2 = 2) 5/2=2.5 rounded up to 3 ( 5/2 = 3)
so, it's answer is rounded up, in C++ we use operation "!" (3!2=2) if I'm not wrong, so how about in matlab?
댓글 수: 0
채택된 답변
the cyclist
2012년 2월 1일
The ceil() function (short for "ceiling") does that. There are also related functions such as floor(), round(), and fix().
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!