I have two matrices A and B (of size 2xN) in matlab of the form:

```
A=[1 2 3 4 5 6
   7 8 9 4 1 9]

B=[7 4 3 5 1 8
   7 8 9 4 7 9]

```

I want to look for the intersection of A and B column by colmun, i.e., I want to delete column 1 and column 3 of matrix A and column 3 and column 5 of matrix B of my above example. Is there a way to do this without loops? Is there a function that do this in matlab?

P.S. The matrices could be of different sizes, i.e., for example, one can has size 2x10 the other can has size 2x20.