LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I delete multiple of N rows from a 2D array

Hi,

 

Let's say I have a 2D array with 20 rows and   10 columns. How can I  - for example- remove multiple of 5 rows programmatically ( rows 0,5,10 and 15)

 

Thanks

0 Kudos
Message 1 of 5
(2,810 Views)

Hi tintin,

 

you could use a loop, a shift register and DeleteFromArray to reach your goal…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,807 Views)

Thanks Gred

I tried shift register with loop but it couldn't work . Can you provide a sample code for it?

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

Or use the conditional indexing terminal.

 

Ben64

 

delete every Nth row.png

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

Or a FOR loop with conditiional autoindexing tunnels.  That would be less prone to fun issues with arrays.


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 5 of 5
(2,787 Views)