LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any function in Labview6.02 for this purpose ..."Array Average"?

Hello..
I have collected some data in the array. Does Labview has the function of "Array Average" in order for me to average the data (a set of data in the column) and get the final value?
Thanks
0 Kudos
Message 1 of 8
(4,032 Views)
Use
1)Numeric/Add Array Elemnts
2)Array/Array Size.

Divide 1) by 2)
0 Kudos
Message 2 of 8
(4,032 Views)
Mathmatics/Probability and Statistics/Mean.vi

This VI takes an array of doubles and returns a double that is the mean (average) of the array.

Kelly Bersch
Anadigm, Inc.
Message 3 of 8
(4,032 Views)
Hi Kelly,
Thanks for the solution. But I would like to know further about this mean. I have read through the help of this vi. It does not tell more other than just giving the mean of the a double.

When you say that this "VI takes an array of doubles"
does that mean (no pun intended).... (eg. an array with 10 elements) the vi will average the data within that array even though it is on-going process and return a mean double of the array?

I hope made it clear here.
Looking forward to your reply.
Once again, thanks.

juni
0 Kudos
Message 4 of 8
(4,032 Views)
Kelly, know that there is one disadvantage of using "Mean": if you want build exe of your application and run on another computer you must copy there lvansys.dll. But if you use "Array Sum" you don't need nothing.
0 Kudos
Message 5 of 8
(4,032 Views)
Here is an example




Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 6 of 8
(4,032 Views)
I don't know any more than the help file says but it appears that the array size doesn't matter though it needs to be a 1D array.

Kelly Bersch
Anadigm, Inc.
0 Kudos
Message 7 of 8
(4,032 Views)
You just need to include the dll as a support file in your build. That way it will be installed along with the executable.

Mean.vi does a better job of getting a "mean" than the simple average. If you know you won't have any data in the array that is way off then the simple average will work just fine. If you could have a little erroneous data then use Mean.vi.

Kelly Bersch
Anadigm, Inc.
0 Kudos
Message 8 of 8
(4,032 Views)