MATLAB: How to round a result to two decimal places

decimal placesMATLAB

r=10 (4/3)*pi*r^3 Round the result to two decimal places

Best Answer

v=(4/3)*pi*r^3;
>> format long g
>> v
v =
4188.79020478639
>> round(v*100)/100
ans =
4188.79
>>
Related Question