MATLAB Answers

Finding distinct values in a column of a matrix

114 views (last 30 days)
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 Comments

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 29 Jun 2012
unique( a(:,1) )

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.