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
 Origin Forum
 help!! Diffusion equations
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

merrick

Portugal
2 Posts

Posted - 04/01/2015 :  11:19:51 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I'm trying to created a new (user-defined) Non-Linear Curve Fit function to fit my experimental values based on the exchange equations by Johnson.
I simulated in excel (using solver and an approximation) and got a good agreement, however as soon as i used this simulated values in origin the fir goes completely crazy. There is no compilation error, so I assume the user-defined function is working well.
Can anyone help me?
My origin code is:
ouble pb,kb,s,l,z,Ma,Mb;
pb=1-pa;
kb=ka*pa/(1-pa);
s=0,5*(ka+kb+Da*x+Db*x);
l=0,5*(ka-kb+Da*x-Db*x);
z=sqrt((l^2)+ka*kb);
Ma=(0,5*pa-((l*pa-kb*pb)/(2*z)))*exp((-s+z)*T)+(0,5*pa+((l*pa-kb*pb)/(2*z)))*exp((-s-z)*T);
Mb=(0,5*pb+((l*pb-ka*pa)/(2*z)))*exp((-s+z)*T)+(0,5*pb-((l*pb-ka*pa)/(2*z)))*exp((-s-z)*T);
y=Ma+Mb

Thanks

Shirley_GZ

China
Posts

Posted - 04/02/2015 :  06:01:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

It seems you didn’t define the parameter “ka” and “pa”. Would you please send us the FDF file (fitting function definition file) via tech@originlab.com and quote this post?

Thanks,

Originlab Technical Service Team

Edited by - Shirley_GZ on 04/02/2015 06:04:43 AM
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