ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a subarray using a Index array function

Hi,

I have an VI that builds an array from a text file.
Now I need to create a sub array which contains the first 81 rows of the first built array by using an Index array function. I know how to do it using a sub array function but can any one help me n doing it with a index array function.

Thanks and cheers,
Ajit
Download All
0 Kudos
Message 1 of 3
(5,168 Views)
You might want to create an array constant and then use a for loop to index one row at a time and insert it into the array constant.
0 Kudos
Message 2 of 3
(5,168 Views)
Hello all,

You can also dynamically create an array by using a for loop. Just pass your main 2D array into a for loop which runs 81 times. You can then use an "index array" function inside the loop and auto-index the output to create your 81-row 2D array.

I modified your VI and attached it. I hope this helps! Let me know if there is anything further I can help with.

Liz F
National Instruments
0 Kudos
Message 3 of 3
(5,168 Views)