In the problem description, you say "The integers should be chosen from the set 1 to n." However, in your example for a 2x2 matrix, you have a 3 as one of the terms. Am I missing something?
function a = match_rot(n)
The problem says given n and s.
However, only n is provided.
Are we allowed to set s?
Lack of s input solved
Sorry guys. Sloppy problem creation on my part. Unfortunately my signature change will invalidate all the solutions up to this point, but yes it should be match_rot(n,s)
"since rot90(a) matches a in exactly _two_ places" for the example in the problem statement?
How to find the position of an element in a vector without using the find function
Back to basics 7 - Equal NaNs
Back to basics 12 - Input Arguments
Find out missing number from a vector of 9 elements
Would Homer Like It?
Spot the rectangle
Breaking Bad Tiles (Spelling with Element Symbols)
Eliminate Polysyllabics: Long live short words!
Count the Digits in the Box
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