The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 nlsf problem with replica

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000