Home
Community
Discussion Forums
Most Active Software Boards
LabVIEW
Topic
LabVIEW
Register
·
Login
·
Help
Community
Category
Board
Documents
Users
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Topic Options
Subscribe to RSS Feed
Mark Topic as New
Mark Topic as Read
Float this Topic for Current User
Bookmark
Subscribe
Mute
Printer Friendly Page
All Forum Topics
Previous Topic
Next Topic
Matching pairs in an array
Matching pairs in an array
Bill Symonds
Member
02-19-2002
02:36 PM
Options
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report to a Moderator
Hi
Is there a quick way of scanning an array for matching pairs of values?
MTIA
Regards
Bill
0
Kudos
Message
1
of 4
(2,961 Views)
Reply
Re: Matching pairs in an array
Ben
Knight of NI
02-20-2002
08:50 AM
Options
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report to a Moderator
1) Sort the array.
2) compare current with previous in a loop.
3) Keep iterating until you are happy.
Ben
Retired Senior Automation Systems Architect with
Data Science Automation
LabVIEW Champion
Knight of NI
and
Prepper
LinkedIn Profile
YouTube Channel
0
Kudos
Message
2
of 4
(2,961 Views)
Reply
Re: Matching pairs in an array
Jason R
Member
02-20-2002
09:27 AM
Options
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report to a Moderator
If you need to keep your data ordered, just iterate from 0-end of array and run a "search 1d array" command on it.
This is much less efficient than sorting/iterative search, but it preserves array order.
0
Kudos
Message
3
of 4
(2,961 Views)
Reply
Re: Matching pairs in an array
Enrique
Active Participant
02-20-2002
01:47 PM
Options
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report to a Moderator
Bill;
You can use the Equal vi to accomplish this. Attached is a simple vi in which you can input a number to search if the number repeat in the array. It should be fairly easy to modify this vi to suit your need.
Regards;
Enrique
www.vartortech.com
Repeated_element.vi 32 KB
0
Kudos
Message
4
of 4
(2,961 Views)
Reply
All Forum Topics
Previous Topic
Next Topic