Finding distinct values in a column of a matrix
    조회 수: 4 (최근 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에서 Loops and Conditional Statements에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!