MATLAB: Data comparision in matlab finding same data After using image processing I have a [r c] = [1 7;2 8;3 9;4 10;5 11;6 12]; and [R C] = [2 8;1 6;4 9;3 9;6 12;8 1;0 15]; The answer should be [A B] = [2 8;3 9;6 12] I want to find all that [R C] which are in [r c]… Best Answer A = [1 7;2 8;3 9;4 10;5 11;6 12]; B = [2 8;1 6;4 9;3 9;6 12;8 1;0 15]; lia = ismember(A,B,'rows'); Anew = A(lia>0,:);Anew contains the rows that are common. Related SolutionsMATLAB: How to flip every 5th row and column in matrix >> M = repmat((1:12).',1,3)M = 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12>> M([4:6:end,6:6:end],:) = M([6:6:end,4:6:end],:)M = 1 1 1 2 2 2 3 3 3 6 6 6 5 5 5 4 4 4 7 7 7 8 8 8 9 9 9 12 12 12 11 11 11 10 10 10 MATLAB: How to create a new matrix with some known rows c = b(a,:) Related QuestionHow to compare a single row with remaining all rows of a matrixHow to Permute the array with specific numberCall all element inside cell (this cell contain another set of cells)Help running Matlab scriptRepeat parts of a matrixHow can i simultaneously reference in cells
Best Answer