MATLAB: How to find the row and column of elements where the value of A is the same as B matrices indexing A and B are matrices. Is there a function I'm missing? Best Answer [i,j] = find(A==B); Related SolutionsMATLAB: Compare elements of the same array n = 10;xm = 40;ym = 60;ij = [randi(xm,n,1), randi(ym,n,1)];d = bsxfun(@minus,ij,permute(ij,[3,2,1]));dist1 = squeeze(bsxfun(@hypot,d(:,1,:),d(:,2,:)));dist1(1:n+2:end) = inf;out = find(all(dist1 > 30)); MATLAB: Find guite the same elements The answer for everyone who wants it is quite simple!for i=1:x-200for j=1:y-800 if mean2(Pattern_epikef==Foto2(i:i+23,j:j+75) ) >= 0.87 Theseis(i-2:i+2,j-2:j+2) = 0; Theseis(i,j)=1; % ana vreis omoio kommati dose 1 ston pinaka endendend Related QuestionElements of Array Should not be the SameFind common elements of the same rowSwiching elements of same vectorCreate a matrix where the elements are the sums of the elements of an old matrix
Best Answer