How Can I Replace/Insert a 1D Array at a Specific Index into a 2D Array in LabVIEW?

Updated Jan 10, 2019

Reported In

Software

  • LabVIEW

Issue Details

I am trying to Replace/Insert a 1D array of elements with values (11,12) into a 2D array at a specific index, If i used the "Replace Array Subset" function I can either Replace the 1D array as a row array at column index 0, or Replace it as a column array at row index 0. How can I insert the array as a row array at a specific index for example insert the array as a row array at row 0 and column 1?
 

Replacing Row Array at Column Index 0

                       
    

Replacing Column Array at Row Index 0

                                     
 

Solution

"Replace Array Subset" and "Insert Into an Array" functions can either control which row or which column the array will be Replaced/Inserted. if you choose to Replace/Insert at a specific row, LabVIEW will interpret the array as a row array. If you choose to insert the array at a specific column LabVIEW will interpret the array as a column array. If you would like to Replace/Insert the array as a row array at a specific column, you can: 

  1. Convert the 2D array into a 1D array,
  2. Specify which row you would like to Replace/Insert the array. 
  3. Replace/Insert the array. 
  4. Change back to 2D array. 
 
  

Additional Information

If you would like to insert the array without overwriting the values at that index use the "Insert Into an Array" function. If you would like to overwrite the values use the "Replace Array Subset" Function