LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array subset using condition

Hi camr,

 

as long as you only show the FP we will not be able to spot the problems in your BD…

Doh!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 15
(1,227 Views)

@GerdW wrote:

Hi camr,

 

as long as you only show the FP we will not be able to spot the problems in your BD…

Doh!


i cannot attach the program so here is the image. i just focus on what i need which is the subset array

12.JPG

 

i am not a programmer and quite lost with labview terminologies

 so please be patient with me

i encircled here where the splitting of subset array doesnt work

123.JPG

 

0 Kudos
Message 12 of 15
(1,211 Views)

Something like this?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 15
(1,185 Views)

@camr_tna wrote:

i encircled here where the splitting of subset array doesnt work


Are the X values always guaranteed to be sorted?

 

In any case, you could use two conditional output tunnels in the little FOR loop (where the condition depends in the scalar x comparison inside the loop) to form the two desired 2D arrays. No splitting needed later.

 

 

 

Even works if the x-array is not sorted.

 

 

 

Download All
0 Kudos
Message 14 of 15
(1,164 Views)

Other way with 2D array (similar to Crossrulz approach):

 

Array Subset.png

Munna
0 Kudos
Message 15 of 15
(1,120 Views)