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.
Add two numbers
All your base are belong to us
Generate N equally spaced intervals between -L and L
Find the Oldest Person in a Room
Self-similarity 1 - Every other term
Rule of mixtures (composites) - other bound
Inscribed Pentagon? 2
Lights Out 11 - 5x5, with wrapping, x moves
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