avg

Computes the average of all the input points regardless of dimensionality.


Synopsis

	function avg(
		x : numeric
	)

Arguments

x
An array of one or more numeric values of any dimensionality.

Description

Returns the average of the input regardless of dimensionality. avg ignores missing values (x@_FillValue). To determine the number of data points used to calculate the average use:
   N = num(.not.ismissing(x))

Example

The following is a simplistic example that demonstrates how avg works. Try running this example and print out the values to get a better idea of how avg works.
begin
;
; Create example array
;
  a = (/ (/1,2,3/), (/4,5,6/), (/7,-999,9/)/)
  a@_FillValue = -999

;
; Compute average
;
  average = avg(a)
  n = num(.not.ismissing(a))
  print(average)
  print(n)  

end
        

Reference Manual Control Panel

NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?


$Revision: 1.6 $ $Date: 1999/03/15 16:59:47 $