11-23-2018 06:30 AM
Hy guys.
I started programming in LabVIEW, but I got stuck. I would like to compare every two consecutive element of an array. I started to do this in a for loop, but I don't know how to get the two consevutive element.
Could you help me out?
P.s: My really task is: I have an 10 different data in a file but they appear in the file more then 1 time and I have to write those 10 data in an array. The following program contain's the idea how I thinked that I can resolve it.
Solved! Go to Solution.
11-23-2018 06:51 AM
For consecutive elements use the first case.
The second one removes all duplicates.
11-23-2018 07:11 AM - edited 11-23-2018 07:11 AM
Thank you. It was really helpful.
Can I have one more question...? What did you wiring for the output, array3, when the case structure is FALSE? Many times I wanted to use the CASE stucture without wiring the FALSE part, but I can't do that.
11-23-2018 07:15 AM
11-26-2018 01:54 AM
Hi Kristóf!
Not entirely sure what you are trying to achieve, but I may have a relevant example lying around.
This VI generates an array from the given elements "Options" in a way that no element is chosen twice. Have a look at the algorithm, you may find it useful!
Cheers!