how to fine repeated value?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
in a column if there is 100 vlaues some are repeated and nonrepeated values how to fine repeated values, how many times it is repeated .
how to get this is there any matlab instruction r code?
Answers (1)
Rik
on 21 Mar 2020
0 votes
If you just wanted to know the repeated values you could use unique to filter each first occurrence, which would leave the repeated values.
As you want to know how often every value occurs the most logical step would be to histcounts. Use max and min to determine the bin edges.
5 Comments
rajesh kumar
on 21 Mar 2020
Rik
on 21 Mar 2020
Have you tried using the histcounts function?
Walter Roberson
on 21 Mar 2020
histcounts and look for entries whose count is more than 1.
rajesh kumar
on 21 Mar 2020
Walter Roberson
on 21 Mar 2020
This does not appear to relate to the original question: the probability of a repeated value created by randn() is very low -- you would have to generate more than 1e8 samples for the probability of even one duplicate to reach 50%.
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!