MEAN

The MEAN function computes the mean of a numeric vector. MEAN calls the IDL function MOMENT.

Calling sequence

Result = MEAN( X )

Arguments

X

An n -element, integer, double-precision or floating-point vector.

Keywords

DOUBLE

If this keyword is set, computations are done in double precision arithmetic.

NAN

Set this keyword to cause the routine to check for occurrences of the IEEE floating-point value NaN in the input data. Elements with the value NaN are treated as missing data. (See Special Floating-Point Values for more information on IEEE floating-point values.)

Example

x = [65, 63, 67, 64, 68, 62, 70, 66, 68, 67, 69, 71, 66, 65, 70]
; Define the n-element vector of sample data.

result = MEAN(x); Compute the standard deviation.

PRINT, result ; Print the result.

IDL prints:

66.7333

See Also

, MEANABSDEV , MOMENT , STDDEV , SKEWNESS , VARIANCE