Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SuperLib 3.50 - function avariance() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FUNCTION AVARIANCE()

  Short:
  ------
  AVARIANCE() Determines the variance of an array with condition


  Returns:
  --------
  <nVariance> => Array variance

  Syntax:
  -------
  AVARIANCE(aTarget,[bCondition])

  Description:
  ------------
  <aTarget> is the target array. Normally an array of
  numeric values. [bCondition] is an optional codeblock used to
  select a subset of the array. This could be used to filter out
  0's or non-numeric elements. The block must accept an array
  element as a parameter, and return true or false <expL> to
  determine if this element is part of the desired subset.

  Examples:
  ---------
   v := AVARIANCE(aSales)
   v := AVARIANCE(aSales,{|e|valtype(e)=="N".and.e<>0})

  Source:
  -------
  S_ASTATS.PRG


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson