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
 Using of the NL fit result in the next NL fitting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

alextrv

3 Posts

Posted - 12/04/2014 :  10:15:42 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):9.0.0 32bit
Operating System: Windows 7

Hello,

im quite new in building the scripts, however i'm trying to perform NL fitting of the complex curve like exponential grow first and then exponential decay. For this purpose i'm using two equations. Initially, i want to complete fitting of the first part of curve and then use fitting result values to continue fitting with the second part of curve.

I tried to apply getnlr function, but it didn't work.

Generally it could look like:

nlbegin aa Association tt mode:=cons;
tt.Aeq
tt.Kobs
nlfit;
nlend 1 1;

getnlr tt iw:=[Book1]FitNL1! p:=1;
tt.Aeq=; tt.Kobs=; // get these values

nlbegin bb Dissociation tt mode:=cons;
tt.Aeq // use value from the previous fit
tt.Kobs // use value from the previous fit
tt.Kdiss // new parameter
nlfit;
nlend 1 1;

Maybe someone can give me an idea how to complete this script?

Thanks,
Alex


lkb0221

China
497 Posts

Posted - 12/09/2014 :  10:21:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I think it will make more sense to built a user-defined fitting function.

Zheng
OriginLab
Go to Top of Page

alextrv

3 Posts

Posted - 12/10/2014 :  04:15:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, thanks for the answering. Yes, you are right I've already tried to build two user defined functions. I will briefly describe them.

To make a fitting of the first part of curve i have to use the following function1 (Association):

y = Aeq * ( 1 - exp(- Kobs *t), where

t is independent parameter,
and Kobs, Aeq(Equivalent Signal) - parameters to be determined.

Once i get the values for these parameters , i have to use them for another fitting of the 2nd part of curve (function2 Dissociation):

y2 = Astop* exp( -Kdiss* ( t - Tstop ) );

where Astop = Aeq * ( 1 - exp(- Kobs *Tstop) ).

So, my question is how can i modify my script to get these Kd and Aeq values from function1 and use them automatically in the function2?



Thank you,

Alex
Go to Top of Page

lkb0221

China
497 Posts

Posted - 12/10/2014 :  11:16:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I've already built a fitting function according to the infos you provided, and it looks working as expected for my fake data.
Would you mind send a real sample data to <tech@originlab.com> so I can test the function further?
And please also provide your serial number in the email.

Zheng
OriginLab
Go to Top of Page

sol708

USA
2 Posts

Posted - 08/07/2015 :  4:47:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hey,
I am doing some curve fitting similar to the description below .
Can you provide the script ?
To make a fitting of the first part of curve i have to use the following function1 (Association):

y = Aeq * ( 1 - exp(- Kobs *t), where

t is independent parameter,
and Kobs, Aeq(Equivalent Signal) - parameters to be determined.

Once i get the values for these parameters , i have to use them for another fitting of the 2nd part of curve (function2 Dissociation):

y2 = Astop* exp( -Kdiss* ( t - Tstop ) );

where Astop = Aeq * ( 1 - exp(- Kobs *Tstop) ).

So, my question is how can i modify my script to get these Kd and Aeq values from function1 and use them automatically in the function2?


quote:
Originally posted by lkb0221

Hi,

I've already built a fitting function according to the infos you provided, and it looks working as expected for my fake data.
Would you mind send a real sample data to <tech@originlab.com> so I can test the function further?
And please also provide your serial number in the email.

Zheng
OriginLab



SOLOMON
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