MPFXGaussPeak
MPFXGaussPeak (cw, yw, xw)
The MPFXGaussPeak function implements a single Gaussian peak with no Y offset in the format of an all-at-once fitting function. It fills the wave yw with values defined by a Gaussian peak as if this wave assignment statement was executed:
yw = cw[2] * exp( -((xw - cw[0])/cw[1])^2 )
Parameters
| cw | Coefficient wave. The Gaussian peak shape is defined by the coefficients as follows: | ||||||
| |||||||
| cw must be a double precision wave. | |||||||
| yw | Y wave into which values are stored. | ||||||
| yw may be either double precision or single precision. | |||||||
| xw | X wave containing the X values at which the peak function is to be evaluated. | ||||||
| xw may be either double precision or single precision. | |||||||
Details
This function is primarily intended to support the Multipeak Fitting package. To use MPFXGaussPeak as a fitting function, wrap it in an all-at-once user-defined fitting function:
Function FitGaussPeak(Wave cw, Wave yw, Wave xw) : FitFunc
Variable dummy = MPFXGaussPeak(cw, yw, xw)
End
The assignment to "dummy" is required because you must explicitly do something with the return value of a built-in function.
If the waves do not satisfy the number type requirements, the function returns NaN. A successful invocation returns zero.