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

 채택된 답변

Andrei Bobrov
Andrei Bobrov 2012년 1월 12일

0 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Vehicle Dynamics Blockset에 대해 자세히 알아보기

태그

질문:

2012년 1월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by