I have large numeric waves that I'd like to compare using a statistic that requires me to know the unique elements in these waves. Is there a simple way to pull these values out of a wave? I've searched and I'm sure I must be missing something obvious. I can think of a way to code up a solution that would go through the wave in a loop to determine the unique values, but I'm sure there must be a function or fast solution that someone can suggest to help me.
Thanks in advance!
p.s. these are non-integer waves. In fact they are samples of angles of rotations.
You could sort the wave, then scan for runs of identical values. Since it's floating-point, you will no doubt need to scan for runs of "almost equal" values.
It's not clear to me whether you need an output wave that contains values that were in your source wave only once, or whether you want a wave containing all values in your original source wave with no duplicate values.
If you're looking for the later and you're using Igor 7, you can use the FindDuplicates with the /RN flag. You may also want the /TOL flag.
If you're looking for the former, you might still be able to use FindDuplicates with one or more flags plus some post processing of your own.
@aclight sorry for the lack of clarity. It's the latter. I am looking for a list containing all values with no duplicates. I am on IP7 and will try FindDuplicates. I will bear in mind John's point about approximate matching. Thanks both!
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
July 7, 2016 at 10:59 am - Permalink
If you're looking for the later and you're using Igor 7, you can use the FindDuplicates with the /RN flag. You may also want the /TOL flag.
If you're looking for the former, you might still be able to use FindDuplicates with one or more flags plus some post processing of your own.
July 7, 2016 at 12:24 pm - Permalink
July 7, 2016 at 02:27 pm - Permalink