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

1 件のコメント

kash
kash 2012 年 1 月 12 日
thanks andrei

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeVehicle Dynamics Blockset についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by