MATLAB: Rounding numbers in a specific values round By having this number Num=10.25 and It's wanted to round it to 10.5 What function should be used to round 10.25 to 10.5 ? Thanks in advance Best Answer multiply by 2, round to the nearest integer, divide back by 2 => round to the nearest 1/2:>> Num = 10.25;>> round(Num*2)/2ans = 10.5 Related SolutionsMATLAB: Rounding big numbers?! >> eps(1799999999999999916113920)ans = 268435456In other words, 180000000000000000000000 is not exactly representable in 53 bit binary floating point. MATLAB: Truncating a number without rounding fix(a*10)/10 Related QuestionHow to round the decimal valuesRound-off issue
Best Answer