C-PLOT

Scientific Graphics and Data Analysis

12.21.5. - Referring to parameters



The internal storage of parameters and related values are in the structure array named fpar, defined in p_fitsize.h. The next lines show how to refer to the parameters in your model equation.
#define CONST    fpar[0].p_b
#define fCONST   fpar[0].p_fit
#define dCONST   fpar[0].p_p

#define LINEAR   fpar[1].p_b
#define fLINEAR  fpar[1].p_fit
#define dLINEAR  fpar[1].p_p
The purpose of the above definitions is to make referencing the current values of the parameters convenient. The structure member fpar[i].p_b indicates the current value of the i-th parameter. The other two members are relevant generally only when you are supplying the analytic derivatives for the corresponding parameter. In such a case fpar[i].p_fit indicates the parameter is currently being fit and fpar[i].p_p is the variable to which you assign the value of the derivative. Their use is made clear below.