From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Delet the values less than Zero from 2d Array

Solved!
Go to solution

Hellow,

If I have a twice of 2d -array-like the attached.

as you can see, the first column in the two arrays have the same sequence, but the starting points are different. 

i want to generate a new array contains in the first column the same column of the input arrays. and the second column is the sum of the second column of the two input array. it's easy to add the values but the problem is how to add a similar point. by another way can I delete all the values less than zero from the input arrays, then the two arrays will be started with zero and will possible to add them,

 

I have tried to do something like the attached but the results not the expected

Download All
0 Kudos
Message 1 of 4
(2,305 Views)

 

actually i solved the problem as the attached .vi.

 

but if you have something simpler please guide me 

0 Kudos
Message 2 of 4
(2,280 Views)
Solution
Accepted by topic author Khallod

This seems to work.

ColumnAdd.png

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 4
(2,274 Views)
Solution
Accepted by topic author Khallod

In the OP case, the array's x values are identical after deleting the start values that are less than zero. Here is another version that's a little more generic. In my particular applications, I cannot guarantee that all x values are identical between the two arrays (i.e, adding antenna gain to a frequency spectrum).

 

Version using Interpolate.png

0 Kudos
Message 4 of 4
(2,256 Views)