Finding distinct values in a column of a matrix
1 次查看(过去 30 天)
显示 更早的评论
I have a 81*4 matrix. I want to find the distinct values only in the first column, which can also be seen as the first column of every row.
eg: a= 2 3
4 3
4 5
2 3
ans should be = 2
4
unique() is of no use here, it supports only whole row distinction.
0 个评论
采纳的回答
Walter Roberson
2012-6-29
unique( a(:,1) )
1 个评论
Abdulaziz Abutunis
2021-8-18
Hi Walter,
I hope you are well.
Can we maintain full arrays corresponding to these unique vlaues
Thanks
Aziz
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!