Problem 2867. Matlab Basics - Rounding III
Solution Stats
Problem Comments
-
4 Comments
You can write as many zeros as you want after 12358470000.0, it's still the same number as 12358470000
what is the problem with the following solution bro !
% roundn(x,2)
Check,it's the same as round(x,2).
Test suite has been updated with additional test cases.
Good problem
Solution Comments
-
1 Comment
nice one
-
1 Comment
easy
-
1 Comment
add more test suites. You can simply write y=12358470000 to pass the test suites now. So add variations
-
1 Comment
easy
-
1 Comment
Interesting problem
-
1 Comment
The problem needs correction. Rounding to nearest 10,000 means no body cares about .000 values. y_correct = 12358470000.000; should be y_correct = 12358470000.
-
1 Comment
nice
Problem Recent Solvers2180
Suggested Problems
-
Find state names that end with the letter A
931 Solvers
-
Renaming a field in a structure array
1038 Solvers
-
How to find the position of an element in a vector without using the find function
2563 Solvers
-
Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
374 Solvers
-
Back to basics - mean of corner elements of a matrix
331 Solvers
More from this Author28
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!