nice
function y = round_ten_thou(x)
y = round(x/1e4)*1e4;
end
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = 12358466243;
y_correct = 12358470000;
assert(isequal(round_ten_thou(x),y_correct))
ans =
1.2358e+10
|
2 | Pass |
%%
x = 12358466243.325;
y_correct = 12358470000.000;
assert(isequal(round_ten_thou(x),y_correct))
ans =
1.2358e+10
|
521 Solvers
511 Solvers
583 Solvers
Back to basics - mean of corner elements of a matrix
297 Solvers
find the surface area of a cube
336 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!