LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adding rows of a 2D array

Solved!
Go to solution

Hello evryone!!

I have a 2D array and I want to add up all the rows of it to make a 1D array. For example if 2D array has 2 rows like:

1 2 3 4

6 7 1 2

 

The output 1D array should be:

7 9 4 6

 

Is there a readily available way 2 do this in Labview? Thanks for the help:)

0 Kudos
Message 1 of 3
(2,678 Views)
Solution
Accepted by LSASS

Transpose the 2D array and then autoindex in a FOR loop containing an "add array elements" primitive.

Message Edited by altenbach on 05-14-2009 07:00 PM
Message 2 of 3
(2,666 Views)

Here's a picture.

 

Message Edited by altenbach on 05-14-2009 07:31 PM
Message 3 of 3
(2,658 Views)