Problem 43278. Make roundn function
Make roundn function using round.
x=0.55555 y=function(x,1) y=1
y=function(x,2) y=0.6
y=function(x,3) y=0.56
Solution Stats
Problem Comments
-
3 Comments
goc3
on 22 Nov 2016
The test suite has been enhanced and expanded.
ty
on 6 Jun 2025
bad
Nicolas Douillet
on 19 Jul 2025
The test suite misses a tolerance value for fair comparisons.
Solution Comments
Show commentsProblem Recent Solvers4326
Suggested Problems
-
1288 Solvers
-
Matrix indexing with two vectors of indices
759 Solvers
-
Remove the two elements next to NaN value
683 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
13069 Solvers
-
536 Solvers
More from this Author27
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!