I want to delete several specific values from a matrix (if they exist). It is highly probable that there are multiple copies of the values in the matrix.

For example, consider an N-by-2 matrix intersections. If the pairs of values [a b] and [c d] exist as rows in that matrix, I want to delete them.

Let's say I want to delete rows like [-2.0 0.5] and [7 7] in the following matrix:

intersections =

   -4.0000    0.5000
   -2.0000    0.5000
    2.0000    3.0000
    4.0000    0.5000
   -2.0000    0.5000

So that after deletion I get:

intersections = 

   -4.0000    0.5000
    2.0000    3.0000
    4.0000    0.5000

What's the most efficient/elegant way to do this?

Edit
Report