Index-> contents reference index search Up-> SPT_HELP Mathematical Functions colavg Prev Next SPT_HELP-> SPTFunctionsByCategory Mathematical Functions Data Manipulation Functions SignalGeneratorMain AnalogFilterFunctions FIR Filter Design Window Functions IIR Filter Design FourierFunctions Plotting Functions Histogram Functions Mathematical Functions-> colavg colmsq colrms db10 db20 even logn powerof2 OtherMathStat sinc colavg Headings-> Description Example

Column-wise Average Value of A Matrix
 Syntax `y = colavg(`x`)` Include: `include spt\colavg.oms` See Also
``` ARGUMENTS:      INPUTS:       x = MATRIX, any numerical type.      RETURN: VECTOR, DOUBLE, column-wise average. ```
Description ``` ```Column-wise average value of matrix Returns a row vector with the column-wise average value of matrix input. Each element of the returned vector is the average value of the corresponding column. Output is of same type as input except for INTEGER input which is coerced to DOUBLE before processing. COMPLEX inputs return COMPLEX outputs.

Example ``` ```For vectors: ``` O>x={0,1,2,3,4,5} O>colavg(x) 2.5 ``` For matrices: ``` O>A={[1,2], [3,4]} O>A { [ 1 , 2 ] [ 3 , 4 ] } O>colavg(A) [ 2 , 3 ]  ```