getAverage Function

Purpose:

Returns the average value of a numeric array.

Syntax:

getaverage(array)

getaverage(array,base,step)

Comments:

Returns the average value.  When an array is packed with say 2 values,  eg, x1,y1,x2,y2 base and step can be used.  This allows you to average only the y values in the array, not averaging the whole array.

Example:

ii = 1,2,8,13

p getAverage(ii)

6

dd = 0.1 , 20 , 0.12 , 40

p getaverage(dd,1,2)