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 Sigmoidal

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
CStorey Posted - 11/08/2000 : 8:25:58 PM
Hello,

I'm looking for a little help automating a NLSF (Sigmoidal). What I'd like to do is:

Fit the sigmoide using the same X column for the curve generation object and get the data into a predefined column to plot in another plot. I can get it to do the fit, but not generate the curve (Boltzmann) data. I would appreciate some help!!

The plotting and dataset manipulating I can do, but I'm new to NLSF. Here's what I've tried (some of it was hacked out of Fit.OGS):


[Boltzy]

// %1 is the Y data column to fit
// %2 is the X data column to fit
// %3 where I'd like the data to end up same worksheet as %1, %2.
// Fit function parameters

nlsf.func$="boltzmann"; //NLSF == Boltzman type
nlsf.y$=%1; //Set fitting Column (dep. variable)
nlsf.fitdata$=%1;
nlsf.x$=%2; //Set indep. variable
nlsf.xMode=0; //Use the X column of %1
limit %1; //Get # of Data pts
nlsf.xPoints=limit.size;
nlsf.constr$=""; //No constraints
nlsf.datastep=1; //Use every data point
nlsf.funcCol$=%3; //Results Dataset

//Script hacked from FIT.OGS, [Sigmoidal] Origin 6.1 Pro!

ii=nlsf.tolerance;
nlsf.tolerance=.0005;
nlsf.cleanupfitdata();

if(nlsf.iterate(1)==-1)
return 1;
nlsf.iterate(2);
nlsf.iterate(3);
if(nlsf.datastep > 4)
{
nlsf.datastep/=2;
nlsf.iterate(1);
nlsf.iterate(2);
}
if(nlsf.datastep > 1)
{
nlsf.datastep=1;
nlsf.iterate(2);
}
nlsf.iterate(50);
nlsf.end(8);
legend;
nlsf.tolerance=ii;

queue
{
SaveRedirection=type.Redirection(16,3); // SDB 1/7/99 REPORT_TO_OUTPUTLOG
type.BeginResults(); /// RKM 12/10/98 v6.0141 REPORT_TO_OUTPUTLOG
type $Sigmoidal.SigFit; ///RKM 5/18/99 ADD_ERROR_BAR_WEIGHTING
%B=errof(%C);
if (exist(%B)==1)
type $regression.UsingWeight;
type;
type $Sigmoidal.Chisqr;
type $fit.Rsquare;
type;
Separator 3;
type $Sigmoidal.Init;
type $Sigmoidal.Final;
type $Sigmoidal.XatY50;
if(ScaleType==1) /* log scale, must be logistic */
{
type $Sigmoidal.Power;
Separator 3;
type $Sigmoidal.XatY20Log;
type $Sigmoidal.XatY80Log;
}
else
{
type $Sigmoidal.Width;
Separator 3;
type $Sigmoidal.XatY20;
type $Sigmoidal.XatY80;
}
/* *5 if a formatting statement for 5 significant digits */
type.EndResults();
type.Redirection=SaveRedirection; // restore previous redirection.
delete -v SaveRedirection;
};
//End of hacked script //

return 0;



Craig Storey

PS - Love the new LabTalk Editor!!
1   L A T E S T    R E P L I E S    (Newest First)
CStorey Posted - 11/14/2000 : 10:19:34 AM

It works as hoped.
Thanks for the help!

Craig Storey


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