From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

extract the positive values of a 2D array

Solved!
Go to solution

Hi,

 

I have a 2D array with positive value in the 2 column.

What I want to do is to find the positive value of each column.

For example, I have this array

 

A        B  

 

-1        1

2         -2

3         9

5         4

-5        6

6         7

 

and I want to obtain the following

 

A          B

 

3          9

5          4

6          7

 

I manage to have the positve in each case but the value do'nt correspond (I have all the positive value of each column) like 

 

A      B

2      1
3      9
5      4
6      6
        7

can you help me please ?

 

0 Kudos
Message 1 of 5
(2,992 Views)
Solution
Accepted by topic author sf1

Just to be clear: You want the output array to contain all the rows of the input array which have positive values in both column A and in column B?  Are you using strictly positive (>0) comparisons or non-negative (>=0)?  Are the values integers?

 

Frr answers: Yes and Strictly positive this will do what you want.

 

Lynn

 

Array selector.png

0 Kudos
Message 2 of 5
(2,967 Views)

Like that? 

 

 

Zero Included? Simple Integers? Can u provide more information?  Solution may change depending on requeriments Smiley Surprised

0 Kudos
Message 3 of 5
(2,965 Views)

I'm using (>=0) comparison and non integers value, and my value are in ligne not column I made a mistake, thank you,

 

I will try what you send, and I'll come for feedback

 

0 Kudos
Message 4 of 5
(2,906 Views)

Thanks It works perfectly 🙂

0 Kudos
Message 5 of 5
(2,878 Views)