02-25-2015 08:09 AM
Hi there,
I'm looking for a way to extract equal values from and 1D Array and delete them. The problem here is, a comparision with a given value should decide which values get deleted and which ones are kept.
precise explanation:
My Input Array (left) is 1D size with a cluster of 2 double values (x and y).
First of all the for-case (1) turns all equal values (x1=x2 & y1=y2) into 0s, afterwards the for-case (2) deletes all zeros from the cluster. This was my intention for deleting all points with the exact same coordinates.
At (3) I'm splitting my cluster into and X and Y Array.
Here's what I'm looking for:
The Cluster contains several points, which have an equal y-coordinate, but a different x-coordinate. I need to compare all those x-coordinates with a certain value and pic the x-coordinate which is the closest to the given value. The other points should be deleted.
I tried already several times, but failed all the time...
thanks in advance
Max
02-25-2015 08:35 AM
Crosspost from German LabVIEWForum!
02-25-2015 08:38 AM - edited 02-25-2015 08:45 AM
Hi!
The below code will delete all values in an array that are equal to the value you have set to delete.
The for loop compares each element in the array to your value to delete.
By using a conditional tunnel mode, the output array will only contain elements that are not equal to the value you want to remove.
EDIT:
Here it is for an array of clusters as in your example.