I think you should change "assert(isequal(your_fcn_name(x),y_correct))
" to "assert(isequal(your_fcn_name(n),y_correct))"
I made the suggested change to the test suite and re-scored.
I believe there is some tricky code in the test suite that has to be overcome by hacking the Cody Scoring server, and execute a function your_fcn_name before it is even called. Or a mechanism to change all x's in n's.
Times 2 - START HERE
Back to basics 25 - Valid variable names
Get the length of a given vector
Remove the two elements next to NaN value
Matlab Basics - Rounding II
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office