T O P I C R E V I E W |
G.Bartsch |
Posted - 09/25/2006 : 07:55:29 AM i want to fit several datasets with a replica of gauss or lorentz. normally i initialize parameters by setting xc1, xc2... a1, a2... w1,w2... and y0. but after nlsf.numReplica=peaks i cant set xc1 and the other parateters any more. in the for loop i use the following for the nlsf initialization: nlsf.msgPrompt=0; nlsf.cleanupfitdata(); nlsf.numReplica=(pn-1); nlsf.func$ = "LorentzForReplica"; xibegin=xindex(xmin, %A_1); xiend=xindex(xmax, %A_1); nlsf.xPoints = xindex(xmaxb,luminescence_1)-xindex(xminb,luminescence_1); nlsf.dataBegin = xibegin; nlsf.dataEnd = xiend; nlsf.xbegin = xmin; nlsf.xend = xmax; and for parameter initialization i use count=0; for(jj=1;jj<=peaks;jj++) { if(pdinil_pwavel$(ii)[$(jj)]==--){}; else { count++; a$(count)=pdinil_pampl$(jj)[$(ii)]; xc$(count)=pdinil_pwavel$(jj)[$(ii)]; }; }; where pdinil is a worksheet in which for every dataset the initial fit parameters (xc,a) are saved. before the main for loop i have nlsf.init(), too. i also tried to put the parameter initialization before the nlsf initialization but after the nlsf.numreplica it seems to forget the xc's, a's etc. with nlsf.p1, etc it seems that i can still set those values but it would be much more convenient to set the values the way mentioned before. maybe someone has an idea what is going wrong. thank you |
3 L A T E S T R E P L I E S (Newest First) |
Mike Buess |
Posted - 09/25/2006 : 09:35:25 AM I still recommend swapping the func and numreplica lines. Otherwise, changing nlsf.func$ will reset nlsf.numreplica to zero.
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 09/25/2006 09:43:01 AM |
G.Bartsch |
Posted - 09/25/2006 : 09:13:33 AM this setting problem suddenly disappeared after restarting the system. thanks for reading. |
Mike Buess |
Posted - 09/25/2006 : 09:06:49 AM Change the order of the func and numreplica statements...
nlsf.func$ = "LorentzForReplica"; nlsf.numReplica=(pn-1);
Mike Buess Origin WebRing Member |
|
|