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
 Forum for Origin C
 step function in originlab 2017
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

academic76

France
1 Posts

Posted - 12/09/2016 :  04:03:38 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2017 -version assay
Operating System: windows 7

I have read a publication from 2010 (doi:10.1039/b9nj00498j) and I would like to estimate parameters : K1,K2,G1,G2. G1,Mt are constants, G, a dependent variable (from experimental measurements) and Lt, independent variable. The code was written like that :

double a;
a=K1*K2;
double b;
b=K1-a*(Lt+2*Mt);
double c;
c=1*K1*(Mt-Lt);
double d;
d=-Lt;
for (L=Lt,step=1;abs(step)>1e-15;L=L-step)
{step=(a*L*L*L+b*L*L+c*L+D)/(3*a*L*L+2*b*L+c);};
G=(Gs+G1*K1*L+G2*K1*K2*L*L)/(1+K1*L+K1*K2*L*L)

But it seems that the step function does not work. It allows to calculate square roots from a polynomial function (degree 3) (aL^3+bL^2+cL+d=0) by the Newton-Raphson procedure and then use L to calculate G.
Could you help me to re-write, in the originPro 2017 version, something that would work...
Thank you for your help.javascript:insertsmilie('')


yuki_wu

896 Posts

Posted - 12/10/2016 :  02:23:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Do you mean your fitting function doesn’t work in Origin 2017?

Did you get any error message or you just get the wrong fitting data?

In order to figure out what went wrong, I think you’ better send your definition file (*.FDF) to us. You can find this file in your User Files Folder(UFF), which can be found from:
Windows START menu> Programs>OriginLab> Origin 2017> User Files Folder> fitfunc.

To contact us, please go to this page:
http://www.originlab.com/index.aspx?go=COMPANY/ContactUS

Regards,
Yuki
OriginLab
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