Problem 545. Flip the main diagonal of a matrix
Solution Stats
Problem Comments
-
1 Comment
goc3
on 24 Feb 2017
Additional test cases have been added.
Solution Comments
-
2 Comments
Kees Roos
on 13 Apr 2012
Dear @bmtran, how can does work? I ask this because you add the vector diag(M) to a matrix. I think you should write
diag(diag(M)) instead of diag(M). Am I wrong?
@bmtran (Bryant Tran)
on 14 Apr 2012
it should be fairly easy to diagnose what i'm doing if you run each argument of my code separately in MATLAB and look at what it's doing, but I don't wanna give anything away to people who have yet to solve this problem.
Problem Recent Solvers625
Suggested Problems
-
6735 Solvers
-
What is the next step in Conway's Life?
1105 Solvers
-
Find the peak 3n+1 sequence value
1832 Solvers
-
Getting the row and column location from a matrix
275 Solvers
-
556 Solvers
More from this Author16
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!