Problem 780. Give a matrix that matches itself when rotated
Solution Stats
Problem Comments
-
5 Comments
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?
s=feval(@evalin,'caller','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?
Solution Comments
-
1 Comment
Just Tweaking...
Problem Recent Solvers12
Suggested Problems
-
Project Euler: Problem 2, Sum of even Fibonacci
1491 Solvers
-
251 Solvers
-
Selecting books on MATLAB for experts and beginners (blindfolded)
68 Solvers
-
Flip the main diagonal of a matrix
587 Solvers
-
Combinations without using nchoosek
83 Solvers
More from this Author50
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!