I'm having trouble deleting a string that can be found in my two arrays.
I have 2 arrays:
array1 = 1 2 3 4 5 6 7 8 9 10 array2 = 1 5 7 8 3 2
If a string is displayed in both arrays, I want to remove it from array1 (example [7,8] ). I tried this line of code below:
array1( find(array1(:,1) == array2(:,1)) ,:) = [];
but I get the following error message:
Usage error == Matrix measurements must match.
What is the right way to do this?
source share