LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does ArraySubset work

I am a new user.  I have a two dimensional array, and I want to select a subarray which is one row of the array.
The help text for Array Subset  indicates that one connects the index pin to specify the first element, row, column, or page to include in the portion of array that you want to return.
 
The question:  How do we know whether a row or a column of a two dimensional array will be returned?
 
I tried to connect the output of the Array Subset to a "Array to Cluster" and I get an error:  "You have connected arrays of different dimensions.  The dimension of (unnamed) is two. The dimension of (unnamed) is one.
 
It appears that Array Subset is returning a two dimensional array, but I want a one dimensional array returned.
 
Help
Thanks, Jim
0 Kudos
Message 1 of 4
(2,278 Views)
The Array Subset will always return the same type of array that is fed in. That's stated in the documentation. Use the "Index Array" function to return a row or column. Simply disable the row or column index, depending on whether you want to return a column or row, respectively.
0 Kudos
Message 2 of 4
(2,269 Views)
To return a 1D array, use the Index Array function and just wire up  the value to the Index (row) input.
0 Kudos
Message 3 of 4
(2,269 Views)
Thanks for quick help
0 Kudos
Message 4 of 4
(2,258 Views)