Problem 2587. Find indices of diagonal elements
Given a matrix A and a diagonal index d (where 0 indicates the main diagonal and off-diagonals are identified by positive and negative integers), return the indices of the elements of this diagonal.
d is always correct but A can contain repetitions, so ...
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers70
Suggested Problems
-
4178 Solvers
-
Convert from Base 10 to base 5
278 Solvers
-
Magic is simple (for beginners)
11032 Solvers
-
Remove entire row and column in the matrix containing the input values
540 Solvers
-
Let's get back to school, and create multiplication tables
235 Solvers
More from this Author43
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!