VF_setNonlinfitOptions VD_setNonlinfitOptions VE_setNonlinfitOptions
VF_setNonlinfitDefaultOptions VD_setNonlinfitDefaultOptions VE_setNonlinfitDefaultOptions
Functionset options for the nonlinear fitting routines
Syntax C/C++#include <MFstd.h>
void VF_setNonlinfitOptions( VF_NONLINFITOPTIONS *Options );
void VF_setNonlinfitDefaultOptions( void );
Pascal/Delphiuses MFstd;
procedure VF_setNonlinfitOptions( Options: VF_NONLINFITOPTIONS );
procedure VF_setNonlinfitDefaultOptions( );
DescriptionThe nonlinear fitting routines like VF_nonlinfit offer the user a lot of different options, packed into a structure VF_NONLINFITOPTIONS (VD_NONLINFITOPTIONS and VE_NONLINFITOPTIONS for the higher accuracy data-types). These options may be set by the function V_setNonlinfitOptions. To retrieve current settings, use V_getNonlinfitOptions. In order to return to "factory settings", call V_setNonlinfitDefaultOptions.
The options set with this function are valid for all fitting-functions of the same accuracy level. Thus, e.g., VD_setNonlinfitOptions sets the options governing VD_nonlinfit,  VD_multiNonlinfit,  MD_nonlinfit,  MD_multiNonlinfit and their siblings with data-weighting ("wW" versions).
This function is not suitable for setting different fitting options for calls to the nonlinfit functions made from different execution threads. Give each nonlinfit call its own set of options instead by using the complete syntax of the nonlinfit functions.
Example C/C++VD_NONLINFITOPTIONS Opt;
VD_getNonlinfitDefaultOptions( &Opt ); // start with "factory settings"
Opt.FigureOfMerit = 0; // choose least-square fitting
Opt.AbsTolChi = 1.e-6;
Opt.FracTolChi = 1.e-3; // make the fit fast, but not very accurate
Opt.LevelOfMethod = 3; // choose alternating Levenberg-Marquardt and Downhill-Simplex runs
VD_setNonlinfitOptions( &Opt );
Example Pascal/DelphiOpt: VD_NONLINFITOPTIONS;
VD_getNonlinfitDefaultOptions(Opt );
Opt.FigureOfMerit := 0; (* choose least-square fitting *)
Opt.AbsTolChi := 1.e-6;
Opt.FracTolChi := 1.e-3; (* make the fit fast, but not very accurate *)
Opt.LevelOfMethod := 3; (* choose alternating Levenberg-Marquardt and Downhill-Simplex runs *)
VD_setNonlinfitOptions(Opt );
See alsochapter 13.3

MatrixLib Table of Contents  OptiVec home