selecting unique values

i have a matrix and i have to select unique values based on first column
i.e
1 2 3
3 4 6
1 4 6
i need as
1 2 3
3 4 6
please help

 Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 12 de En. de 2012

0 votos

in this case:
I = [1 2 3
3 4 6
1 4 6]
[b b] = unique(I(:,1),'first')
out = I(b,:)
please read about unique

Más respuestas (0)

Categorías

Más información sobre Dynamic System Models en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 12 de En. de 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by