LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

deleting elements of an array out of a user defined range

Solved!
Go to solution

Hello, 

 

I'm trying to create a subVi to filter a signal wich is stored in an array. I need to delete all elements wich are out of a user defined range. (something wich takes the array, the maximum and the minimum and returns the array cleaned).

 

I've tried to do this for a day, but without result ...

 

Someone can help me ? 

 

Thanks in advance 

Eugenio

0 Kudos
Message 1 of 10
(3,384 Views)

well your statement is not  clear what do you want.

what i understand is you have an array in  which you want values after and before threshold.

that you can achive with search 1 D array for specific value and split array. 

can you show what you have tried so far

0 Kudos
Message 2 of 10
(3,362 Views)

yes exactly, I have an array and need to eliminate all the elements wich are not inside the threshold.

 

Til now I've done this. Every element out of range becomes NaN.

 

Now with search and split elements out of range must be eliminated, but how ?

0 Kudos
Message 3 of 10
(3,359 Views)

yes exactly, I have an array and need to eliminate all the elements wich are not inside the threshold.

 

Til now I've done this. Every element out of range becomes NaN.

 

Now with search and split elements out of range must be eliminated, but how ?

0 Kudos
Message 4 of 10
(3,356 Views)

sorry swaped labels of limit controls 

0 Kudos
Message 5 of 10
(3,353 Views)
Solution
Accepted by topic author uge026

Is this what you want ?

0 Kudos
Message 6 of 10
(3,342 Views)

its okay do you know in range and coerce function works on an array also.

0 Kudos
Message 7 of 10
(3,339 Views)

Thank u !!!

0 Kudos
Message 8 of 10
(3,333 Views)

okay just another solution.

if you have version of LabVIEW in which you can enable conditional terminal in for loop life is much simpler.

 

 

Download All
0 Kudos
Message 9 of 10
(3,322 Views)

If you have a version with conditional indexing:

In%20Range[1]_BD.png


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 10 of 10
(3,314 Views)