JD, I think I figured out why Binbin and I (and more than likely a good number of other players) are having issues with your test suite. I think your "assert(isempty(strfind(filetext, '0')),'0 forbidden')" line is catching everyone who has the digit 0 in their MATLAB ID number. Binbin and I have that, while you do not. I just hacked the test suite, and tried a non-hacking correct answer from Alfonso...with the same result - my solution failed because 0 is forbidden.
this is still true while the only diff is this is a badge problem now . Please fix
The offending line—asserting lack of '0'—has been commented out.
Thanks goc :)
I'm also curious about the test suite, Binbin. I'm not quite sure why
y = diff([x+1 1]); fails the test suite.
Binbin, James - I am not sure why either of your solutions didn't work. I submitted them, and they both passed... Maybe try resubmitting...? Maybe there's a bug in Cody...?
why this solution is wrong?
Sorry for the double comment, but I can't delete the one I posted under my solution.
I'm also curious about the test suite, Binbin. I'm not quite sure why my solution of "y = diff([x+1 1]);" fails the first test suite. I don't see any of the forbidden words in there.
Binbin, James - I am not sure why either of your solutions didn't work. I submitted them, and they both passed... Maybe try resubmitting...? Maybe there's a bug in Cody...?
1631 Solvers
223 Solvers
383 Solvers
1045 Solvers
Number of Even Elements in Fibonacci Sequence
697 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!