selecting unique values

13 次查看(过去 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

更多回答(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