matlab - Same value must exist at least 3 times in a Matrix -
the matrix <1x500> consists of different values, want check if of values in matrix occurs @ least 3 times or more.
if (val occurs 3 times or more)
help appreciated!
another option @kiw answer when need know values appear @ least 3 times is:
uniqa=unique(a); counts=histcounts(a,[uniqa inf]); vals_that_are_bigger=uniqa(counts>=3);
to check if of them bigger 3, just
if any(counts>=3)
Comments
Post a Comment