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
 Forum for Origin C
 NLSF

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
ardaerhan Posted - 03/04/2005 : 12:05:17 PM
Origin Version (Select Help-->About Origin): 7.5
Operating System:Windows XP

Hi All,

i am performing non linear fitting using the following labtalk commands:

// Perform nonlinear fit with ExpDec function
using NLSF = LabTalk.NLSF; // Point to LabTalk NLSF object
NLSF.Init(); // Initialize NLSF object
NLSF.Func$ = "exp"; // Select function
NLSF.P1 = A; // Perform parameter initialization
NLSF.P2 = L;
NLSF.FitData$ = expData.GetName(); // Set fit dataset name
NLSF.Wtype = 3; // Set NLSF weighting method to arbitrary dataset
NLSF.W$ = expErr.GetName(); // Set error dataset name
NLSF.ChiSqrErr = 0; // Turn off scaling of parameters with chisqr
NLSF.Fit(100); // Perform 100 iterations
NLSF.Fit(100); // Repeat a couple of times to ensure convergence
NLSF.Fit(100); // Not all 100 iterations will be performed each time
NLSF.PasteParams("P"); // Paste parameters to plot
NLSF.End(); // End fitting session


what i need is just the parameters of the fitting, i dont want origin to plot the graph, because im performing 100 fits and this takes so long time if it will plot the 100 curves.

Thank you
Arda
3   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 03/04/2005 : 4:53:05 PM
Hi Arda,

I tried the function pasted below in 7SR4 and 7.5SR5 and in both cases, I do not get a graph created. Perhaps you can debug the code and see when the graph gets created?

Note that I used NLSF.end(13) instead of nlsf.end() - but that is to turn off reporting to result log, turn off the result worksheet etc. and using 13 or leaving it as no argument both did not create a graph for me.

Easwar
OriginLab


void test()
{
using NLSF = LabTalk.NLSF;
NLSF.Init();
NLSF.output(0);
NLSF.Func$ = "expdecay1";
NLSF.P1 = 70;
NLSF.P2 = 0.01;
NLSF.P3 = 80;
NLSF.P4 = 0.2235;
NLSF.V4 = 0;
NLSF.FitData$ = "data1_b";
NLSF.Wtype = 3;
NLSF.W$ = "data1_c";
NLSF.ChiSqrErr = 0;
NLSF.IterateEx(100);
NLSF.IterateEx(100);
NLSF.IterateEx(100);
NLSF.End(13);
}


ardaerhan Posted - 03/04/2005 : 4:08:43 PM
Hi Easwar;

I did as you said :
using NLSF = LabTalk.NLSF;
NLSF.Init();
NLSF.output(0);
NLSF.Func$ = "user6";
NLSF.P1 = Io;
NLSF.P2 = p;
NLSF.P3 = xo;
NLSF.P4 = dL;
NLSF.V4 = 0;
NLSF.FitData$ = cosData.GetName();
NLSF.Wtype = 3;
NLSF.W$ = D.GetName();
NLSF.ChiSqrErr = 0;
NLSF.IterateEx(100);
NLSF.End();

but im still getting the graphs? is there a problem with what i did.
thank you for your help

quote:

Hi Arda,

Add the following line right after NLSF.Init():
NLSF.output(0);

Also, please change the lines
NLSF.Fit(100)
to
NLSF.IterateEx(100);
Otherwise you will get multiple NLSF result worskheets - this was a mistake in the example area - we will update.

You should also then remove the line
NLSF.PasteParams("P")

Easwar
OriginLab



easwar Posted - 03/04/2005 : 12:29:26 PM
Hi Arda,

Add the following line right after NLSF.Init():
NLSF.output(0);

Also, please change the lines
NLSF.Fit(100)
to
NLSF.IterateEx(100);
Otherwise you will get multiple NLSF result worskheets - this was a mistake in the example area - we will update.

You should also then remove the line
NLSF.PasteParams("P")

Easwar
OriginLab


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