LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Index array question

Solved!
Go to solution

Hi everyone,

 

I know that I can use a reshape array to convert a 2D to 1D.

But I'm curious to knew how come when I wire a 2D array into an index array and there's no constant for the index inputs, the output comes out as a 1D array?

How does it work in this case? could someone please explain this to me?

 

0 Kudos
Message 1 of 3
(2,179 Views)

Hi LHX,

 

IndexArray defaults to index the first row of a 2D-array as can be seen by it's non-filled 2nd index input:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,174 Views)
Solution
Accepted by topic author LHX

Index Array functions always returns the element or subarray of n-dimension array at index. By default, if you do not wire any index input terminals, the first subarray indexes row 0, the second subarray indexes row 1, and so on.

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 3
(2,172 Views)