LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Average rows of a 2D array to a 1D array

Is there a built in array sub vi or math function in Labview (8.2) that will let  me average or at least add all rows( or columns) in a 2D array and give me a resulting 1D array?
I can build one I suppose, but was wondering if there is already something built in. Integer arithmetic is fine.
0 Kudos
Message 1 of 3
(3,280 Views)
I don't think there is anything built in, but it's very simple. This will average the rows, if you want columns, just transpose the arry before the for loop.
 

Message Edited by Marc A on 03-01-2007 04:43 PM

Message 2 of 3
(3,272 Views)
Marc
 
Thank you. This is a very simple, but very neat & a smart solution. Thought of using the Mean vi, but this idea never popped up. I did try with the Add two polynomials vi, but I think that is not as elegant and seems to be a bit slower.
 
klk
0 Kudos
Message 3 of 3
(3,234 Views)