How to remove the diagonal of a matrix 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!

If you take the vector as a $1\times 3$ matrix $v = \begin{pmatrix} 
x_1 & x_2 & x_3
\end{pmatrix}$ then
$$\begin{pmatrix} 
x_2 & x_3 \\
x_1 & x_3 \\
x_1 & x_2
\end{pmatrix}
=
\begin{pmatrix} 
1 \\
0 \\
0
\end{pmatrix}
v
\begin{pmatrix} 
0 & 0 \\
1 & 0 \\
0 & 1
\end{pmatrix}
+\begin{pmatrix} 
0 \\
1 \\
0
\end{pmatrix}
v
\begin{pmatrix} 
1 & 0 \\
0 & 0 \\
0 & 1
\end{pmatrix}
+\begin{pmatrix} 
0 \\
0 \\
1
\end{pmatrix}
v
\begin{pmatrix} 
1 & 0 \\
0 & 1 \\
0 & 0
\end{pmatrix}
$$
But I doubt this turn out to be useful. I thing you'll do better just using the matrix you want instead of a representation through matrix operations.
