Finding corresponding Y value in matrix with redundant data
Mostrar comentarios más antiguos
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.
Respuestas (1)
Andrei Bobrov
el 5 de Mzo. de 2014
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);
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!