LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

need help for average

Hi, I am compiling a program by using Labview. I get one 2D Array after 2 loops : one is inside and the other is outside loop. Right now, what I want to do is to find the mean values of the every cell in the array after measurement eg. [1, 2, 3] - first try; [1.1, 2.01, 2.99] -second try; [0.9, 2.1, 3.1] - and so on and the averaged signal that I want to get is [mean(1, 1.1, 0.9) ; mean(2, 2.01, 2.1) ; mean(3, 2.99, 3.1)].I can't suceed in getting the right result. Please helpe me.
0 Kudos
Message 1 of 5
(2,521 Views)
Probably all you need to do is transpose the 2D array and feed that into a for loop with the mean function inside. In the attached example, the inner for loop simulates something like taking a reading from ch1, then ch2, and then ch3. The outer for loop would be for taking 3 readings of each channel. The final array is the mean for each channel.
0 Kudos
Message 2 of 5
(2,521 Views)
Hi, Dennis Knutson,
Thank you for your answer so soon. But your labview version is 6.1 and mine is 6.0, so I can't read your example. Can you give me the example on labview version 6.0 or transfer your example from the version 6.1 to 6.0?
Thanks again.
Whuili
0 Kudos
Message 3 of 5
(2,521 Views)
0 Kudos
Message 4 of 5
(2,521 Views)
Hi, Dennis Koutson,
I get it and have succeed in this program. Thanks a lot.
Whuili
0 Kudos
Message 5 of 5
(2,521 Views)