DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


Declaration: CreateGaussianRBF (PosX, PosY: integer; KWidth, Ampl: double; var Data: TDouble2DArray): integer;
The function CreateGaussianRBF generates a Gaussian radius basis function (RBF) and fills the array Data with the corresponding values. The parameters PosX and PosY control the location of the center of the RBF. The parameters KWidth and Ampl control the width and the amplitude of the RBF.

The following figure shows the generated radius basis function using the following parameters:

PosX = 40
PosY = 50
KWidth = 25.0
Ampl = 1.0

The function returns the following error codes:

 0 ... everything is OK
-1 ... the parameter kWIdth must be greater than zero
-2 ... the size of the Data array is too small (minimum size is 2x2 cells)