selecting unique values

조회 수: 14 (최근 30일)
kash
kash 2012년 1월 12일
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일
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
  댓글 수: 1
kash
kash 2012년 1월 12일
thanks andrei

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dynamic System Models에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by