LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert the same element into a 2D array of strings

Hi, 

I have an array of rows and 1 coulmn and I would like to put one element in all the specific places

 

For example lets say the column is 2 and the array of rows are 1,3,4    and Data is 122 

 

so the array shoudl look like this 

 

              Coulmn 1          2         3            4             5 

 

Row 1                            122             

Row 2

3                                    122

4                                    122                                        

5

 

I have tried insert into array and Repalce Arrat Subset but still I couldn't do it

 

Thanks

 

0 Kudos
Message 1 of 3
(1,360 Views)

You could autoindex on the array of rows on a FOR loop and replace the correct element at each iteration. Make sure to keep the array in a shift register.

 

There are many easy ways to do that, but since you did not show us any code, we cannot tell what you are doing wrong. Please show us what you got so far...

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

Try this (remember that the first row or column is index 0, so modify as needed if you want to start with one.)

 

 

 

(The function is "replace array subset")

 

0 Kudos
Message 3 of 3
(1,338 Views)