Problem 44031. Matrix Manipulation
Solution Stats
Problem Comments
-
1 Comment
The test suite of this problem has been updated to actually check for numbers in the specified range (between 3 to 15), so your random solutions should now work.
Solution Comments
-
4 Comments
Any chance you could make the test suite see if the numbers are actually random? :-)
It's actually quite a difficult thing to do well. See for example Problem 44393 at https://www.mathworks.com/matlabcentral/cody/problems/44393 , which so far has only one solver (in addition to my reference solution). Cf. the Test Suites in Problem 174 by Bryant Tran and Problem 44277 by Amitava Biswas. —DIV
(Here it's a little easier because the author can repeatedly call the user's function with the same input, and check for variation in the returned output.)
David, that's kind of what I meant by checking to see if the output was random. Run the code maybe 10-15 times, and see if the values are different each time would be "random enough" for Cody.
-
1 Comment
If the test suite did check for the values being random, then this solution wouldn't have worked.
-
2 Comments
Problem Recent Solvers33
Suggested Problems
-
12051 Solvers
-
4507 Solvers
-
473 Solvers
-
668 Solvers
-
3383 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!