07-02-2015 05:23 AM - edited 07-02-2015 05:25 AM
Hello all,
I am making a subVI which inserts an element into a specific column and row.
What I would like to know is how to initialise an already existing 2D array
I have tried the reshape array function, and initialising my array to whatever the column and row I would like to insert into is, incredmented by 1.
Enough this seems to initialise the array, it also moves what is already in the array.
07-02-2015 05:46 AM
Use the initialise array function to create the array of the correct size with the data you want (e.g. an empty string - if you need to initialise it with different values then use for loops) and then use replace array subset to fill in the array.
07-03-2015 03:30 AM
Thanks for your reply Sam,
Is it possible to initialise more cells to an already existing 2D array, because what I'm trying to do is insert a value outside of the initialised area
07-03-2015 03:38 AM
Initialize the array at the final size (as shown), use replace array subset to insert the original array at position 0,0, then replace the new element as already shown.
("reshape array" is NOT the correct function for this, because it keeps the original array elements in memory order and thus rearrange things quite a bit)