how about function "rem"?
Thanks for the catch. I've added that function to the outlawed list for this and all subsequent problems in this set. Let me know if there are any other functions that should be added to that list.
FYI, I had commented my code with text that included the word "remains". This triggered a false positive in the test for forbidden function "rem". Perhaps it is possible to forbid instead "rem[spaces]("?
I suggest that "factor" should be (or should have been) banned.
I added factor to the banned list. [Though, the test suite includes very large numbers (as strings) that are beyond the storage limit of single- or double-precision variables.]
Also, that sort of string with wildcards (for capturing rem) would work if regexp were used, but I use strfind in the test suite. That way, only the direct use of those exact strings will trigger that test case to fail.
Many solutions can be made that only check 0, 2, and 6 and fail on 4 and 8, thus not checking properly. The tests should include more unique ending digits, at least one of each 0-9.
Your test cases only ever end in 0, 1, 2, 3, 6, and 7 and many solutions give the wrong answer on 4, 5, 8, or 9.
It shows me wrong.
Determine whether a vector is monotonically increasing
Matrix with different incremental runs
Change the sign of even index entries of the reversed vector
MATLAB Basic: rounding II
I Plead the Fifth
Lights Out 6 - 5x5, 13 moves
Rule of mixtures (composites) - other bound
Mechanical Advantage of a Gear Train
Stress-Strain Properties - 5
Find the treasures in MATLAB Central and discover how the community can help you!
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