T O P I C R E V I E W |
merrick |
Posted - 04/01/2015 : 11:19:51 AM 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
|
1 L A T E S T R E P L I E S (Newest First) |
Shirley_GZ |
Posted - 04/02/2015 : 06:01:21 AM 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 |
|
|