You are here: Symbol Reference > AbstractMtxVec Namespace > Classes > TMtxVec Class > public > StdDev Method > TMtxVec.StdDev Method ()
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxVec.StdDev Method ()

Standard deviation.

Pascal
function StdDev: double; overload;

Calculate the standard deviation of all calling object elements. The result is a real value. An exception is raised if calling vector Complex property is true.

Mean

var a: TVec; c: double; aMean: double; begin CreateIt(a); try a.SetIt(False,[1,2,3,4]); aMean := a.Mean; c := a.StdDev(aMean); //if both Mean and StdDev are required this is faster // c := a.StdDev; //this is an alternative. finally FreeIt(a); end; end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!