0

I have a matrix A that is size 967874 x 3 and a vector v that is length 7211.

I want to create a new matrix B that equals matrix A minus all the rows in A where the 2nd column value equals any of the elements in v.

What's a fast way to accomplish this?

Austin
  • 6,921
  • 12
  • 73
  • 138

1 Answers1

2
B = A(~ismember(A(:,2), v), :)
O'Neil
  • 3,790
  • 4
  • 16
  • 30