I just don't need to extract the diagonal of a matrix, but I need to remove it so if I have a matrix of size $N\times N$:
$$ \begin{bmatrix} x_{11} & x_{12} & x_{13} \\ x_{21} & x_{22} & x_{23} \\ x_{31} & x_{32} & x_{33} \\ \end{bmatrix} $$
I end up with a matrix of size $N\times(N-1)$:
$$ \begin{bmatrix} x_{12} & x_{13} \\ x_{21} & x_{23} \\ x_{31} & x_{32} \\ \end{bmatrix} $$
If it is useful, in my case all the rows of the matrix are equal, so the question can be also how to transform a vector: $$ \begin{matrix} [ x_{1} & x_{2} & x_{3} ] \end{matrix} $$
Into the matrix:
$$ \begin{bmatrix} x_{2} & x_{3} \\ x_{1} & x_{3} \\ x_{1} & x_{2} \\ \end{bmatrix} $$
Any matrix mapping or help is really appreciated! Thanks a lot!