LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filter array data

Hello,

 

I need to filter an array through a specific number of a string in this array, as shown in the image below

leandrofeder_0-1721828945326.png

But I'm not able to create this filter
Can you help me please?

0 Kudos
Message 1 of 6
(330 Views)

It is not a "filter" if the output array has more elements than the input array and your code does not make much sense.

 

Can you explain the processing steps and the final output you want?

 

 

0 Kudos
Message 2 of 6
(328 Views)

There are cases where I don't have some No.

For example, in this case I don't have No.2, No.6 and No.8, and in the lines that should be these values should be with the dash

The final array should follow an ascending order of these values, and the No. that are not in the initial array should be with the trace

0 Kudos
Message 3 of 6
(323 Views)

OK, it seems you want to insert sentinel elements where the digits are not consecutive.

 

Are the numerics guaranteed to be singe digits or could there be more (e.g. H0-No456-CH)?

0 Kudos
Message 4 of 6
(320 Views)

The values do not exceed 30
E.g.: H0-No30-CH

0 Kudos
Message 5 of 6
(316 Views)

Start with this and modify as needed (e.g. read the number of the last element to determine the number of iterations needed, etc.)

 

altenbach_0-1721830446601.png

 

Note that for array diagram constants always show one element past the final (or show the scrollbars), else we have no idea how large the array really is.

 

If you have control over how the input is formed, I would recommend to have all numbers padded with sufficient zeroes to the same number of digits, e.g. 

 

H0-No01-CH

H0-No02-CH

...

H0-No25-CH

H0-No26-CH

...

 

This makes alphabetic sorting the same as numeric sorting, especially useful for e.g. file names.

0 Kudos
Message 6 of 6
(310 Views)