Problem 151. Magic!
Check whether the input matrix is a normal magic square:
Output the logical value true or false.
Solution Stats
Problem Comments
-
6 Comments
Show
3 older comments
the cyclist
on 8 Mar 2013
I was not notified about some of the older comments, so was unaware of some of the weaknesses of the test suite, and the "gamed" solutions. I have substantially improved the test suite.
the cyclist
on 8 Mar 2013
The MATLAB command magic(2), although it does produce output, is not a magic square, according to the definition. (There is no 2x2 magic square.)
Dyuman Joshi
on 7 Feb 2023
Test cases have been added to the problem.
Solution Comments
Show commentsProblem Recent Solvers297
Suggested Problems
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1864 Solvers
-
Find the "ordinary" or Euclidean distance between A and Z
163 Solvers
-
Basics: 'Find the eigenvalues of given matrix
423 Solvers
-
588 Solvers
-
14672 Solvers
More from this Author23
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!