Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
cheyenne
Posted - 06/28/2005 : 2:55:27 PM Origin Version (Select Help-->About Origin): 7.5 Operating System: XP
Here I am again. I wrote a piece of labtalk code following the example of another member i.e. by "easwar" , but I keep on running into the same mistake: the extremes of the data interval to fit never change. This is crucial as I am trying to fit the whole data range in sequential steps. Can, please, somebody explain to me where I got it wrong? Thank you very much once again in advance... This is just a test code, but still not working:
// Get length of active dataset
limit %c;
// Number of groups
numgroup = 10;
// Initialize NLSf object
nlsf.init();
// Assign function
nlsf.func$="FermiLiquid";
// Point to active dataset
nlsf.fitdata$=%c;
// Loop over each group of points in active dataset
for(i = 1; i <= 2; i++)
{
// Use mks1, mks2 to set data markers
mks1 = 2 + (i-1)*10 ;
mks2 = 12 + (i-1)*10 ;
// Give some initial value to parameters
nlsf.p1=0.00037;
nlsf.p2=0.00000114;
nlsf.p3=1.4;
// Iterate
nlsf.iterate(5);
// Report to script window;
type $numgroup;
type $(mks1);
type $(mks2);
type Data Fitted from $(mks1) to $(mks2);
type Param1: $(nlsf.p1) +/- $(nlsf.e1);
type Param2: $(nlsf.p2) +/- $(nlsf.e2);
type Param3: $(nlsf.p3) +/- $(nlsf.e3);
type Reduced ChiSqr: $(nlsf.chisqr);
type "";
}
1 L A T E S T R E P L I E S (Newest First)
Mike Buess
Posted - 06/28/2005 : 3:01:22 PM Try nlsf.dataBegin and nlsf.dataEnd instead of mks1 and mks2.