LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert 1D array into 3D array

I need to insert a 1D array into a 3D array as a new row into a specific page. Since the Insert Into Array will only insert 2D into 3D, I am using the Build Array to turn the 1D into a 2D and then using the Insert Into Array. My problem is that it inserts it as a new page rather than a row on a page. Does anyone know how to insert a 1D array into a 3D array as a new row in a certain page?
0 Kudos
Message 1 of 5
(3,174 Views)
it may not be the best method but I can suggest this as a workaround.

Use Index Array to pull out the page you want to add to edit. Then use Insert into Array to put the 1D array into the page and use Insert into Array again to replace the page in the 3D array.

I will attach a short example I made which illustrates the point.

Good luck!

-Craig
-scraggs99
0 Kudos
Message 2 of 5
(3,174 Views)
Hi,

Please check this small example I wrote that should do the trick. It inserts a 1d array in the selected page at the selected row and pads the other pages with a row of zeros.

Regards,

Cyril Bouton
Applications Engineer
National Instruments
Cyril Bouton
Active LabVIEW Developper
0 Kudos
Message 3 of 5
(3,174 Views)
Worked great! Thanks
0 Kudos
Message 4 of 5
(3,174 Views)
Can you please explain to me what was happening inside the false case of case structure inside the loop.

Are you adding extra row of zero to each page if it is false
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(3,174 Views)