I am trying to obtain the repeated values in each row from a matrix and then store it in a separate matrix. I'm thinking of using unique and histc functions to do so.
Q = [ 27.1028 32.3493 28.5714 28.5714; 17.1429 17.1429 18.4581 12.9200]
The repeated values in row 1 is 28.5712, in row 2 it is 17.1429. I want to obtain these values so P = [28.5712; 17.1429]. One problem I'm facing is using the unique function. unique(Q) gives me ALL the values. Why is it so?
Best Answer