What your problem description asks for and what your test suite asks for are different. Specifically, test case 4 requires that the operation be commutative, which, by your problem statement, it is not (since the power function itself is not commutative). This is reflected in the other test cases as well. (also, you call your arguments x and y in the description and a and b in the template).
You are correct. I had the "and b^a" in there originally, but I accidentally deleted it when I added the "for 2≤a≤x and 2≤b≤y" text. It's fixed now, and the description should be a bit clearer.
Nice! What I do like about cody is that it introduces ppl to commands they may not normally use! I in effect 'hand made' a reshaped vector that I could have used this awesome function for o_O
Find relatively common elements in matrix rows
Implement a ROT13 cipher
Given an unsigned integer x, find the largest y by rearranging the bits in x
middleAsColumn: Return all but first and last element as a column vector
Circular Primes (based on Project Euler, problem 35)
Unique dice configurations
Kurchan 4x4 - Optimal score
Pandigital Multiples of 11 (based on Project Euler 491)
Diophantine Equations (Inspired by Project Euler, problem 66)
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