Hello,
So I have a matrix A
A = [ 1 2 3; 2 3 4; 4 5 6]
I create another matrix B where B =[] and the element in B will be added from A. Matrix B becomes
B = [ 1 2; 2 3; 3 1; 2 3; 3 4; 4 2]
The forloop technically go through each row of A to pick the elements for each row of B. B is nx2 matrix. As we can see, "2 3" is repeated. I want to make an If statement that prevent adding existing row in B.
Please help, thank you so much.
Best Answer