This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 0.5555;
n = 3
y_correct = round(x*10^(n-1))/(10^(n-1));
assert(isequal(myroundn(x,n),y_correct))
n =
3
y =
0.5600
|
2 | Pass |
x = 0.1111;
n = 3
y_correct = round(x*10^(n-1))/(10^(n-1));
assert(isequal(myroundn(x,n),y_correct))
n =
3
y =
0.1100
|
1163 Solvers
246 Solvers
Multiples of a Number in a Given Range
214 Solvers
Find the dimensions of a matrix
372 Solvers
373 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!