Problem 43634. Find product of eigenvalues of n*n magic matrix.
Find product of eigenvalues of n*n magic matrix.
Example
n=3
Matrix= [ 8 1 6; 3 5 7; 4 9 2]
result=-360
Solution Stats
Problem Comments
-
1 Comment
Hello, Andriy Kavetsky. The tolerance in test 2 of the Test Suite is quite strange. As written, it seems that a result that is 1000 times larger than the true answer would be accepted as adequate. See Problem 44690 & Problem 44691 for some alternative cues. Also, it is recommended that at least four cases be provided in a Test Suite, though more are often necessary to prevent hard-coded workarounds. —DIV
Solution Comments
Show commentsProblem Recent Solvers69
Suggested Problems
-
Replace NaNs with the number that appears to its left in the row.
3034 Solvers
-
1195 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
390 Solvers
-
307 Solvers
-
184 Solvers
More from this Author37
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!