Do you know which MATLAB function can do the following work: to remove the diagonal elements of a (N+1)x(N+1) matrix to generate a new NxN matrix.
For say, the old matrix is
[ 0 1 2 3 1 0 2 3 1 2 0 3 1 2 3 0 ]
the generated new matrix is
[ 1 2 3 1 2 3 1 2 3 ]
Best Answer