Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Calculates average value in a matrix column.

Component Version macOS Windows Linux Server iOS SDK
Matrix 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Matrix.Avg"; MatrixRef; Column { ; firstRow; lastRow } )   More


Parameter Description Example Flags
MatrixRef The matrix reference number. $matrix
Column The index of the column.
Default is 0.
firstRow The index of first row.
Default is 0.
0 Optional
lastRow The index of last row.
Default is Matrix.Height-1.
5 Optional


Returns number or error.


Calculates average value in a matrix column.
You got a record set in memory and we can walk over a column in a given row range to add the sum value and later divide by number of values.


Calculate average:

Set Variable [ $r ; Value: MBS( "Matrix.Avg"; $matrix; 1;2;5 ) ]

See also

Blog Entries

This function checks for a license.

Created 8th April 2019, last changed 7th April 2022

Matrix.AddRows - Matrix.CSV