LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replace array subset of 2D array with 1D array

Just curious why replace array subset when replacing a column in a 2D array requires a 2D array to be the input if you wire up a row index? But, if you do not wire up a row index, it will allow you to just wire up the column index and will accept a 1D array. Why does a row offset matter? See image:

 


0 Kudos
Message 1 of 4
(6,651 Views)

It's because you are specifying 2 dimentions.  LabVIEW will replace the array elements starting at the given coordinate and within the size of the new array subset.  See if my example explains it better.  Plus, how would LabVIEW know which direction it is to replace if given a new 1D array and both dimentions specified.

 

Insert 2D Array.png



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
Message 2 of 4
(6,644 Views)

@crossrulz wrote:

Plus, how would LabVIEW know which direction it is to replace if given a new 1D array and both dimentions specified.

 


Doh, so obvious.Smiley Embarassed

Message 3 of 4
(6,639 Views)

@for(imstuck) wrote:
Doh, so obvious.Smiley Embarassed

Yeah, we all have those moments...



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 4 of 4
(6,634 Views)