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
 gauss fit with two peaks

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
axel3 Posted - 01/28/2003 : 10:17:07 AM
I try to write a script to fit 1 column with two peaks (gauss). I have got some results but if I compare the results ( xc1 and xc2 ) I have never got the same as from the fit made usig the normal origin features. Where is my mistake?
I use this script:

B=390;
E=450;
S=1;

for (j=0;j<=S-1;j+=1)


{ nlsf.init(); // initialize fit

nlsf.dataBegin=B; // Fitbereich begin
nlsf.dataEnd=E; // Fitbereich ende

nlsf.func$=Gauss; // define function to be used during fitting
nlsf.fitData$=Data1_c$(j); // define data to be fitted
nlsf.numReplica=1; // =1 implies 2 peaks
nlsf.p1=0; // initialize y0
nlsf.p2=1.266; // init xc1(center 1)
nlsf.p5=1.277; // init xc2 (center 2)
nlsf.funcX$=data1_a; // X data to be used to create fit dataset
nlsf.funcCol$=Data1_c$(j); // fit dataset



for(ii=1;ii<=2;ii+=1) // Parameterbestimmung

{

nlsf.p$(3*ii)=0,01124; // initialize widths p3 (w1), and p6 (w2)
nlsf.p$((3*ii)+1)=0.001; // initialize Areas p4 (A1), and p7 (A2);

};


nlsf.fit(50); // perform 20 iterations
Can anybody help me? Thanks!!
1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 01/28/2003 : 10:34:33 AM
Hi,

Does increasing the number of iterations in your script help? Depending on your data, you may have a rather broad/flat chi-sq surface and if that is the case, you may get different parameters based on how many iterations, because the chi-sq may not be changing when the parameters change slightly.

If the above does not help, you should send your data to your local tech support representative so that they can run your script and see what the problem could be.

Easwar
OriginLab.


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