matlab - How to extract elements in an array that have multiple entries? -
i have large vector contains monotonically increasing data or duplicate, looking this:
data = [0 1.1 2.2 3.3 4.4 4.4 4.4 4.4 5.5 6.6 6.6 6.6 7.7];
in data set, i'm interested in duplicate entries (in case, 4.4
, 6.6
). have sorta clunky solution extract these values, feel matlab should have one-liner solution extract result like
result = [4.4 6.6];
Comments
Post a Comment