Problem 55230. Find Closest Constant
Solution Stats
Problem Comments
Solution Comments
-
3 Comments
I had to trick the test suite, i think in the solution "c-exp(1)" is wrong, shouldn't it be pi?
test suite for exp(1) is incorrect
I don't understand the comments about exp(1). "e" (exp(1)) is listed as one of the constants in the problem statement. Its value is 2.7183... So an input of 2.5 should return e, as shown in the examples (being closer to 2.5 than sqrt(2) = 1.414...)
Problem Recent Solvers202
Suggested Problems
-
1008 Solvers
-
Construct an index vector from two input vectors in vectorized fashion
341 Solvers
-
Find the sides of an isosceles triangle when given its area and height from its base to apex
1298 Solvers
-
String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
989 Solvers
-
Find x rows where the sum of the numbers is the maximum
307 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!