How to find repeated values in a matrix?
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Polar Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!