12-10-2019 02:23 AM
Hi ,
i have an array of string that i want to extract how many times each element appear.
thank you.
12-10-2019 02:48 AM
@Emna20 wrote:
Hi ,
i have an array of string that i want to extract how many times each element appear.
thank you.
Is the element one character or a sequence?
If it's one element, convert to byte array, and use Equal? on a byte element. Then convert the Boolean array to 0-1, and add the elements.
If it's a longer string, use a match pattern, and put it in a while loop. Put the start index in a shift register. Stop looping if the result is -1. "i" is the number of elements found.
12-10-2019 03:50 AM
Take a look here for a similar question.
12-10-2019 06:51 AM
@StevenD wrote:
Take a look here for a similar question.
With LabVIEW 2019, I would do a similar structure except using Maps. You should see a little more performance and the structure is easier to understand.