VF_GaussVD_GaussVE_Gauss
FunctionGaussian normal distribution function.
Syntax C/C++#include <VFmath.h>
int VF_Gauss( fVector Y, fVector X, ui size, float Wid, float Cent, float C );
C++ VecObj#include <OptiVec.h>
int vector<T>::Gauss( const vector<T>& X, T Wid, const T& Cent, const T& C );
Pascal/Delphiuses VFmath;
function VF_Gauss( Y, X:fVector; size:UIntSize; Wid, Cent, C:Single ): IntBool;
DescriptionYi = C / (Wid * sqrt(2*p)) * exp( -0.5*((Xi-Cent) / Wid)2 )
Wid = width of the distribution
Cent = center of the distribution
C is a scaling factor; for C = 1.0, the distribution is normalized.
For Wid = 0, the normal distribution is in fact a delta distribution with Y = C * INF at X = Cent and Y = 0 at all other values of X.
Since infinities are not supported, the existence of a point X = Cent will lead to a SING error in case Wid is zero.
Error handlingSING errors may occur only for a Wid of zero. They are handled with the default result set to ±HUGE_VAL.
Return valueFALSE (0), if no error occurred, otherwise TRUE (non-zero).
See alsoVF_expmx2,   VF_erf,   VF_sech2,   VF_Lorentz

VectorLib Table of Contents  OptiVec home