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: 

how to get multiple columns from a 2d array in a loop

Solved!
Go to solution

I wanted to select several columns from a 2D array and form a new array which will be my final data.

I have the program below. I would like to know if there is a smart way to do it using FOR loop.

I've tried once but no success.

select_col.jpg

0 Kudos
Message 1 of 4
(3,250 Views)

Maybe I'm reading this wrong.

Aren't you just deleting certain columns out of your 2-D array?

The Delete From Array function may be what you're looking for.

You could even call it in a loop if you use high to low sorted array of indices to delete.

0 Kudos
Message 2 of 4
(3,243 Views)

Taki,

 

Delete would also work. But I cannot figure out the correct way to do it. The array was not sorted.

0 Kudos
Message 3 of 4
(3,240 Views)
Solution
Accepted by topic author Coben

Array Index Snippet.png

 

Autoindexing is your friend.

Pretty sure this should work.

 

0 Kudos
Message 4 of 4
(3,237 Views)