Finding corresponding Y value in matrix with redundant data
이전 댓글 표시
I want to find corresponding Y value in matrix with redundant data.
Example:
x = [4 8 2 5 8 2] y = [1 2 3 3 4 5]
I want to get y value of 8. but i can't use indexing as in matlab for redundant data we get index as 1.
답변 (1개)
Andrei Bobrov
2014년 3월 5일
x = [4 8 2 5 8 2];
y = [1 2 3 3 4 5];
l0 = ~ismember(x,y);
out = unique(x(l0));
outidx = find(l0);
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!