Autodesk Inventor Engineer-to-Order
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Remove duplicate list
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I have 171 list and each list has 2 numbers. Some of the list are duplicates. Is there a function or loop that can do this.
Thanks, John
Re: Remove duplicate list
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
RemoveDuplicates. Note, however, Scott Heide (see message below) found a defect in it when using a comparison function. As long as you are satisfied with "Equal" as the comparison, it should work fine. If it doesn't work in your particular case, please post a sample of the data, and I will look into it.
--Jack Gregory
Re: Remove duplicate list
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
RemoveDuplicates() will remove duplicates within One list. I am trying to remove duplicate lists.
Example: {{4.5,6},{2.5,6},{1.5,8},{4.5,6}}
Collect all list except because it is a duplicate list.
John
Re: Remove duplicate list
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Intent >RemoveDuplicates({1,2,2,3})
--> {1, 2, 3}
Intent >RemoveDuplicates({{1,2,2,3}, {1,2,2}, {1,2,2,3}})
--> {{1, 2, 2, 3}, {1, 2, 2}}
Intent >
Using your exact list:
Intent >RemoveDuplicates({{4.5,6},{2.5,6},{1.5,8},{4.5,6}
--> {{4.5, 6}, {2.5, 6}, {1.5, 8}}
It is recursive.
--Jack Gregory
Re: Remove duplicate list
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
wow...it works.
Thanks, John
