there is a matrix like
A=[ 0 1 0; 0 2 0; 1 0 0; 1 0 1];compering A(1,:) and A(2,:), i choose [0 2 0];compering A(3,:) and A(4,:), i choose [1 0 1].the final matrix i want is A=[ 0 2 0; 1 0 1];
This is just a simple example, if the matrix is M*N, how to use matlab code to get the matrix i want.
Best Answer