I want to specify an element in a matrix and get all the elements in the diagonal of the element.
For example: $$\left( \begin{array}{cccc} 1 & 2 & 3 & 4 \\ 5 & 6 & 7 & 8 \\ 9 & 10 & 11 & 12 \\ \end{array} \right)$$
when I specify an element 7 in the above matrix, I can get all the elements {4,7,10}
in the reverse diagonal of the element.
When the specified matrix elements have duplicates, the multiple lists of the opposite diagonals of containing the specified element are output.
Diagonal[Reverse@({
{1, 2, 3, 4},
{5, 6, 7, 8},
{9, 10, 11, 12}
}), 0 - 2]