for eg if i have a matrix
4 5 9 8 3 8
3 2 4 10 1 3
1 9 9 6 7 7
2 1 7 4 6 7
2 6 3 5 4 2
7 2 2 9 3 4
How do I calculate the sum of the diagonal of the element 10 if I have its row and column indices?
So the output should be 9 + 10 + 7 + 7.
Thanks!