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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 fit limits
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Atomfried

Germany
Posts

Posted - 11/01/2004 :  11:13:19 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.0
Operating System: Win XP

Hi,

I have written a script that performs polynomial regressions by calling the stat.pr()-function. The interesting part of it is:


worksheet -a 2;
wks.col6.type=4; // Set col(F) as X
stat.reset(); // can't see the effect :)
stat.pr.order=5;
stat.data$=%A_E; // data to be fitted
stat.fitxData$=%A_F;
stat.fityData$=%A_G;
stat.makeX.fitnpts=201;
stat.makeX.fitx1=2;
stat.makeX.fitx2=4;
stat.makeX();
stat.pr();


It works fine, but the result, i.e. the obtained parameters are always the same, no matter what limits (fitx1 and fitx2) I choose. I have the impression, that the script fits the whole curve and then just cuts off the X-values <2 an >4


What did I do wrong?

Roman

Mike Buess

USA
3037 Posts

Posted - 11/01/2004 :  12:44:12 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Roman,

I have not used the stat object but according to the documentation the stat.makex properties only control the curve that's created from the fit. You should be able to use the MKS1 and MKS2 system variables to limit the range of points in the data set that are fitted...

worksheet -a 2;
wks.col6.type=4; // Set col(F) as X
stat.reset(); // can't see the effect :)
stat.pr.order=5;
stat.data$=%A_E; // data to be fitted
stat.fitxData$=%A_F;
stat.fityData$=%A_G;
stat.makeX.fitnpts=201;
stat.makeX.fitx1=2;
stat.makeX.fitx2=4;
MKS1=xindex(2,%A_E); // start fitting with the point at X=2
MKS2=xindex(4,%A_E); // stop fitting with the point at X=4
stat.makeX();
stat.pr();

Mike Buess
Origin WebRing Member
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000