How can I specify the maximum number of iterations or the tolerances used within the NLINFIT function within the Statistics Toolbox?

조회 수: 7 (최근 30일)
Is it possible to change the maximum number of iterations ('Maxiter') argument or the tolerances ('Betatol' and 'Rtol') arguments of the function NLINFIT in the Statistics Toolbox 4.0 (R13)?
How can I specify the maximum number of iterations or the tolerances used within the NLINFIT function within the Statistics Toolbox 4.0 (R13)?
These properties are specified within the "maxiter", the "betatol", and the "rtol" variables within within the NLINFIT function.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2009년 6월 27일
This enhancement has been made for the Statistics Toolbox 5.0 (R14). For previous product releases, please read below for any possible workarounds:
To work around this issue, try creating your own function , called NLINFIT2, based on the code of NLINFIT. Do do so, save NLINFIT as NLINFIT2, and change the 'Maxiter', 'BetaTol' or 'Rtol' arguments. For example, on lines 64 to 67, you can change from:
maxiter = 100;
iter = 0;
betatol = 1.0E-4;
rtol = 1.0E-4;
to
maxiter = 500; % Your value
iter = 0;
betatol = 1.0E-6;
rtol = 1.0E-6;
Note that this is not officially supported by MathWorks, Inc.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by