LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding rows in an array

I have an array with multiple columns of data ..i.e
(111,
222,
333)
and I would like to add the elements in each row, so that I have one column ..i.e (666) But I can't find a LabVIEW function to do so...please help
0 Kudos
Message 1 of 3
(3,105 Views)
Iterate over your 2D Array in a For Loop, using an auto-indexing tunnel to pass the data.  Then pass each row into the Add Array Elements function and output the result to an output tunnel with auto-indexing enabled.  The result will be a 1D Array, whose values are the sum of each row's column values.


Good luck,

-Jim

Message Edited by Jim Kring on 04-15-2007 04:55 PM

0 Kudos
Message 2 of 3
(3,104 Views)
Thank you...it worked very well, except there is an extra data point in the last row after the sum was taken...the number is always 1
0 Kudos
Message 3 of 3
(3,094 Views)