rounding numbers in a specific values
조회 수: 2 (최근 30일)
이전 댓글 표시
채택된 답변
Guillaume
2020년 3월 7일
multiply by 2, round to the nearest integer, divide back by 2 => round to the nearest 1/2:
>> Num = 10.25;
>> round(Num*2)/2
ans =
10.5
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!