Arithmetic Mean (Technical Spec)

This page contains the Technical Spec for the Arithmetic Mean candidate, which is based on the Arithmetic Mean (Functional Spec).

Key Technical Requirements

 * Calculate:
 * the arithmetic mean of an input 1D Array,
 * the arithmetic means of the rows or columns of a 2D Array, or
 * the arithmetic mean of two scalars.
 * High performance handling of array data sets

Arithmetic Mean (1D)

 * Use Add Array Elements and divide by array length.
 * Convert array and length to EXT before division for better precision



Arithmetic Mean (2D Rows)
Call Arithmetic Mean (1D) in a For Loop auto-indexing rows from the input 2D array and outputting the arithmetic means of rows 1D array.



Arithmetic Mean (2D Columns)
Call Arithmetic Mean (2D Rows) after transposing the input 2D array.



Arithmetic Mean (2 Scalars)
Build array from two scalars and call Arithmetic Mean (1D).



Note: It is important that we call the array implementation, rather than simply performing an "( A + B ) / 2" operation. Quoting | a comment by Jean-Pierre Drolet:  "I'd like to add that there is more in the mean algorithm than blindly summing and dividing. The result mean is independent from the order of the elements in the array while it is not true when summing array elements in a for loop with shift register.  So to make sure that the results of the arithmetic mean VIs are consistent with LabVIEW algorithms, they must avoid any summing by themselves but shape the incoming data as a 1D array and use the provided mean VI. Add Array Elements also gives a sum that is independent of the array order."

Arithmetic Mean (2 Scalars)
=History=
 * 9 Jul 2008
 * Added "2D Scalar" implementation
 * changed connector panes to 5x3x3x5+90deg to better accommodate "2D Scalar" implementation
 * changed "2D Columns" implementation to use "2D Rows" implementation instead of duplicating its (For Loop) code
 * added additional block diagram documentation.
 * 7 Jul 2008
 * decided to use the Add Array Elements and divide by array length implementation.
 * Added Arithmetic Mean (2 Scalars)
 * Arithmetic Mean (2D Columns) now calls Arithmetic Mean (2D Rows) instead of using For Loop.
 * Improved Block Diagram documentation.
 * 25 Apr 2008 - Removed [i]0ms Wait[/i] issue; the wait operation was removed from the function.
 * 8 Apr 2008 - Arithmetic Mean (Technical Spec) wiki page created from meeting notes & discussion thread.