Imagine that $D = eye(size(A)(1))$ , being $A$ an input matrix. How can I code to appear that $A$ has $D(:,j)$ and does not have $D(:,i)$.
Example : If I have a matrix like this one: $$A = \begin{matrix} 2 & 0 & 1 & 3 \\ 4 & 1 & 2 & 7 \\ 2 & 0 & 5 & 6 \\\end{matrix}$$ what can I code to appear that $A$ has $D(:,2)$ and does not have $D(:,1)$ and $D(:3)$.
Surprisingly, but there exist the function
intersect. Probably, this one will help :intersect(D',A','rows').