Prev: TOMLAB optimization
Next: MEATools name conflict
From: chattarbir on 30 Nov 2009 11:32 I get the following error when i run lsqnonlin routine "Maximum number of function evaluations exceeded; increase options.MaxFunEvals" Where exactly i can increase the above parametre. I tried already in the command "OPTIONS = optimset('Display','iter','MaxFunEvals',100,'TolFun',1e-30, 'TolX',1e-30);" which precedes the lsqnonlin routine as it is required as input for to run the routine. But in this way it is still not working Would appreciate the advice regards chattarbir singh
From: Alan Weiss on 30 Nov 2009 13:15 chattarbir wrote: > I get the following error when i run lsqnonlin routine > "Maximum number of function evaluations exceeded; > increase options.MaxFunEvals" > > Where exactly i can increase the above parametre. I tried already in the command > "OPTIONS = optimset('Display','iter','MaxFunEvals',100,'TolFun',1e-30, 'TolX',1e-30);" > > which precedes the lsqnonlin routine as it is required as input for to run the routine. > > But in this way it is still not working > Would appreciate the advice > > regards > chattarbir singh Correct your poor choices of TolFun and TolX before you increase MaxFunEvals. I suggest you set: OPTIONS = optimset('Display','iter'); If you must choose smaller values of TolFun and TolX, I suggest 1e-8, not 1e-30--this choice is guaranteed to fail. For more information, see http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/br44iv5-1.html#br44i1u Alan Weiss MATLAB mathematical toolbox documentation
From: Andrzej Miekina on 30 Nov 2009 13:28 "chattarbir " <chattarbirsingh(a)gmail.com> wrote in message <hf0s21$laf$1(a)fred.mathworks.com>... > I get the following error when i run lsqnonlin routine > "Maximum number of function evaluations exceeded; > increase options.MaxFunEvals" > > Where exactly i can increase the above parametre. I tried already in the command > "OPTIONS = optimset('Display','iter','MaxFunEvals',100,'TolFun',1e-30, 'TolX',1e-30);" > > which precedes the lsqnonlin routine as it is required as input for to run the routine. > > But in this way it is still not working > Would appreciate the advice > > regards > chattarbir singh '100*numberofvariables' is default value for MaxFunEvals If you try to solve one-variable problem than increase this number to 1000 for example; if your task is N-variables you can try increase this number 1000*N, and if it is not enough increase more ... OPTIONS = optimset('Display','iter','MaxFunEvals',1000,'TolFun',1e-30, 'TolX',1e-30); and use lsqnonlin with seting OPTIONS x = lsqnonlin(fun,x0,lb,ub,OPTIONS)
|
Pages: 1 Prev: TOMLAB optimization Next: MEATools name conflict |