Problem 1502. Perl 1: push
Solution Stats
Problem Comments
-
4 Comments
All test suites wrongly defined. It should be assert(isequal(num,y_correct))
Why wrongly defined? I will fix it if you can told me what's wrong with the test cases. I saw already cody examples which combines several tests into one assert call. Sure I should call assert(isequal(num,num_correct)) instead of assert(isequal(num,length(y_correct))) but both versions should work (I have already fixed it).
The test cases should test for the correct length of the modified x vector and the correct contents!
I just modified the problem a little bit because functions like assignin seems not to be allowed in cody. It is not my preferred definition of the problem but the problem should be solvable in cody...
Thanks.
Problem Recent Solvers70
Suggested Problems
-
Remove the small words from a list of words.
1133 Solvers
-
Determine Whether an array is empty
729 Solvers
-
181 Solvers
-
Find out missing number from a vector of 9 elements
281 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
351 Solvers
More from this Author3
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!