LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete duplicate entries

Yes that is it!

 

To make an image viewable....

WE have asked that be improved but...

1) Once you have posted your response, click on your jpg to open the jpg in a new screen.

2) Copy the URL

3) Return to your post and edit it.

4) Position your cursor were the image should appear them clcik the "insert Image" button (looks like mountains) and paste in the URL from step #2.

5) Submit you modified post.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 11 of 23
(1,741 Views)
Thanks for the input Ben and sture!  BTW, this is the first post I used the picture insertion.  I saw the instructions on a previous post.  I really like how well the community here supports each other. 
0 Kudos
Message 12 of 23
(1,733 Views)

sture,

The implementation shown has one drawback, it moves the first searched digit to the end of the final array.  I don't know if that would be acceptable since we were asked to just remove duplicates.  How can you prevent the reorder of the first searched digit to the end of the array?

 

 

Tom

0 Kudos
Message 13 of 23
(1,717 Views)

" it moves the first searched digit to the end of the final array"

does getting rid of the "increment" after the loop help?

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 23
(1,716 Views)
Thanks for the help, the order does not matter. I haven't had the chance to try it out yet - but it looks good!
0 Kudos
Message 15 of 23
(1,711 Views)

No, that needs to be there in order to get all the required points.

 

Tom

0 Kudos
Message 16 of 23
(1,709 Views)

"does getting rid of the "increment" after the loop help?"

If I initialize the array with a zero rather than the first number in the original array AND remove the final increment, it does work -- unless zero is one of the elements!

 

Tom

0 Kudos
Message 17 of 23
(1,707 Views)
I just had a thought about this. Instead of searching the newly created array for each element, search the original. If the index found is not equal to the current value of i, you have a duplicate. If it is equal to i, you found the first instance of the value and you replace an element in the new array. This way you can fill the new array with zeroes and the order will be preserved.
0 Kudos
Message 18 of 23
(1,698 Views)

Here is a revision that I think will work.

Ben

Message Edited by Ben on 05-01-2007 09:25 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
0 Kudos
Message 19 of 23
(1,692 Views)
Also, the OpenG library has a "Remove Duplicates From 1D Array".
0 Kudos
Message 20 of 23
(1,680 Views)