A rounding problem that falls under ceil and round
    조회 수: 8 (최근 30일)
  
       이전 댓글 표시
    
I would like to round a number up to the nearest 100 place 
i.e 
x = 20
y = round(x)
y = 100
I'm doing this to record the maximun possible value, I know ceil will always round up but I can't set it to a set value
here is the current code
distance = 50; % Distance the package will travel (Km)
distnace_check = round(distance,-2);
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!