Problem 58807. Array size along k-th dimension
Solution Stats
Problem Comments
-
4 Comments
The test cases use undefined variables.
@Tim, everything is set before the first test case runs.
Interesting. We can't see anything before the first test, but it's there. For example, I couldn't test my code by pasting the tests into the scratch window, but I could submit and run it successfully. I've thought that CP 2166 is unsolvable because of missing code, but maybe it's just not visible.
@Chris, it's a quirk of Cody I recently discovered: if you submit a problem, all code in the test suite before the first section marker is run before the test suite but not shown as part of the test code. I used this feature (if it is indeed one) here partly in order to try it out, and partly in order to make cheating just a little bit harder.
If the consensus is that this hinders legitimate solutions, I can of course edit the problem to make the hidden code visible.
Solution Comments
Show commentsProblem Recent Solvers8
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15604 Solvers
-
Number of 1s in the Binary Representation of a Number
455 Solvers
-
Create matrix of replicated elements
383 Solvers
-
489 Solvers
-
Who is the baby and who is the daddy in this family?
49 Solvers
More from this Author17
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!