LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add 1D array at the bottom of another 1D array?

I know this is a basic or stupid question, but I can't find any exsited functions Vis to that kind of operation. thanks for your help.
0 Kudos
Message 1 of 16
(10,779 Views)
Use the build array function. Resize the build array function for two inputs. Wire each array to to an input, then right click on the build array funcion and select concatenate inputs. The result will be a 1D array with the second array added on to the end of the first.
Enjoy!

SteveA
Steve Aposhian
Message 2 of 16
(10,777 Views)
"aj595" wrote in message
news:50650000000800000009450000-1019262487000@exchange.ni.com...
> I know this is a basic or stupid question, but I can't find any
> exsited functions Vis to that kind of operation. thanks for your help.

If what you want is to add two 1D arrays to be a longer 1D array use build
array and right click on it and choose concatenate.
0 Kudos
Message 3 of 16
(10,777 Views)
yes, i have the same problem, the 2 answeres above would concatenate the second array to the END of the first array. what we need is an additional row BELOW the first.
0 Kudos
Message 4 of 16
(10,651 Views)
Hi loko,

just use the same approach, but without concatenation... (Maybe you have to transpose the resulting 2d array to fit your needs.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 16
(10,644 Views)
Hello... i require continuously adding 1 d arrays below the existing 1 d array? is that possible?
0 Kudos
Message 6 of 16
(10,637 Views)
You can insert an empty row below the first array. just check the attachment
 
Use shift register in while loop to save the previous loop array result and give that as first input to concatenate array function. This way you can continuously add an array below the existing array...
0 Kudos
Message 7 of 16
(10,632 Views)

lokomokoeh

Do read in detail all the replies given before your query ( especially SteveA and Gred's)

That will help u find answer for your query.

what the last poster 'Reddy' has shown will build a multi dimension array with each input array as one dimension

Note: If you want to just keep adding 1D array to an existing array, use buld array. But click on the 'build array' function and enable concatenate arrays in drop down menu.

Message Edited by devchander on 07-20-2006 07:02 AM

Message 8 of 16
(10,632 Views)
Using shift registers would give me an error " you have connected two arrays of different dimensions". This is with " concatenate inputs" option disabled.
Please understand that what I require is that I want to place, to an existing 1 d array, another 1 d array BELOW the first array... so the result would be a 2 row array. THEN, continuously adding another 1 ROW array to the 2 ROW array so it becomes a 3 row array then a 4 row array then a 5 row array... Not a 1 D array getting longer and longer....
 
THanks for the help...
 
0 Kudos
Message 9 of 16
(10,594 Views)

lokomokoeh,

Plz pose your queries as lucidly  as possible to get a clear answer.

If the case is as you have explained now, then Reddy's example is an the ideal approach

Regards

Dev

 

0 Kudos
Message 10 of 16
(10,587 Views)