You are here: Symbol Reference > clMtxVec Namespace > Classes > TOpenCLMtxVec Class > public > Mean Method > TOpenCLMtxVec.Mean Method ()
MtxVec VCL
ContentsIndex
PreviousUpNext
TOpenCLMtxVec.Mean Method ()

Mean value.

Pascal
function Mean: double; overload;

Calculate the mean value of all calling object elements. The result is a real value. An exception is raised if calling object TOpenCLBase.ComplexComplexproperty is true.

var a: TOpenCLVector; b: double; begin CreateIt(a); a.CopyFromArray(,[1,2,3,4]); b := a.Mean; // b = 2.5 FreeIt(a); end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!