Finding distinct values in a column of a matrix

16 ビュー (過去 30 日間)
divya r
divya r 2012 年 6 月 29 日
コメント済み: Abdulaziz Abutunis 2021 年 8 月 18 日
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.

採用された回答

Walter Roberson
Walter Roberson 2012 年 6 月 29 日
unique( a(:,1) )
  1 件のコメント
Abdulaziz Abutunis
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 ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by