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
 LabTalk fit

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
Belsinga Posted - 06/08/2010 : 03:03:24 AM
Origin Ver. and Service Release (Select Help-->About Origin): 8 SR 6
Operating System: Win Xp

Hello,

I can not seem to get my simple fitting-script to work. Can anyone help? (he doesnt seem to understand my dataset or something?

regards,
Boudewijn

*****************
dataset DS1=col(Q9);

LR -b DS1

type "Slope is $(lr.b)";
type "Quality is $(lr.r)";
7   L A T E S T    R E P L I E S    (Newest First)
larry_lan Posted - 06/11/2010 : 08:46:42 AM
Hi:

I doubt you didn't active the worksheet that contains Q9. When using dataset ds=col(Q9), it will refer to the Active Worksheet. Or, you should specify the full data range.

Now that you are using Origin 8, I suggest you can use our new X-Functions to do nonlinear fitting. Please search nlbegin in the programming help. There are examples for how to use these X-Functions. And you can specify a range to fit part of the curve.

Thanks
Larry
Belsinga Posted - 06/11/2010 : 05:44:30 AM
Never mind, I allready found it:

it should be "slsf.dataBegin"

Regards,
Belsinga Posted - 06/11/2010 : 03:40:40 AM
Thank you,

This one works, but I don't understand why it only works with "newbook;" Can't you call on existing workbooks?

Secondly, I am now working with non linear fits. I would like to edit the x-range of the fitted curve and I tried the following, but somehow it still fits the entire curve, could you comment on that?

Thanks

/******************/

nlsf.func$ = Allometric1;
a=1;
b=1;

nlsf.cleanupfitdata();
nlsf.numfitsets = 1;
nlsf.fitdata$ = Book5_F;

double Vxmin = 0.02;
double Vxmax = 0.03;


nlsf.xBegin = Vxmin; nlsf.xEnd = Vxmax;

// WHY DOESNT IT CHANGE ACCORDINGLY IN THE PLOT?

type $(Vxmin);
type $(Vxmax);

//nlsf.xPoints = 201;
nlsf.fit(100);

nlsf.funcx$ = Book5_A;
nlsf.funccol$ = Book5_R1; nlsf.makecurve(func);
larry_lan Posted - 06/10/2010 : 10:45:39 PM
Hi:

It's weird. dataset DS col(Q9) (no '=' sign) is invalid and should return error in 8.0 SR6. How about the following script:

newbook;
col(a) = data(1, 30);
dataset ds = col(a);
stats ds;
ty "The sum of column a is $(stats.sum)!";


Thanks
Larry
Belsinga Posted - 06/10/2010 : 08:02:33 AM
Hi,

I get no apparent errors.

The code doesn't seem to get to "TST2"
(when I removed the '=' sign in "dataset DS=col(Q9)", the errors dissapeared).

*****************************
type "TST1";

dataset DS col(Q9);

type "TST2";

LR -b DS [0,50];
//lr.maxLRange = 50;

type "Slope is $(lr.b)";
type "Quality is $(lr.r)";
larry_lan Posted - 06/08/2010 : 04:47:00 AM
Hi:

Did you see any Error Message? We tried and the script have no problem. If the issue still exist, maybe you can send us your OPJ and we can try again.

Thanks
Larry
OriginLab Technical Services
Belsinga Posted - 06/08/2010 : 03:14:18 AM
Obviously, the ";" was missing, but that was not the problem

*****************
dataset DS1=col(Q9);

LR -b DS1;

type "Slope is $(lr.b)";
type "Quality is $(lr.r)";
[/quote]

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