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
 Import fitting function from DLL file in Origin 9
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

lsm85

Germany
2 Posts

Posted - 07/25/2016 :  04:10:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Origin Pro 9
Operating System: Win7 32 bit

Deal all,

I have to fit my data using a function in dll file format.
Can you explain me step by step (for a dummies) how to import dll file in Origin Pro 9?
Here are file:
https://www.dropbox.com/sh/r25tcv8damw3owl/AAAtGiDyRJ3QSo-02SsWyMYwa?dl=0

Thanks in advance!

lsm85

Germany
2 Posts

Posted - 07/25/2016 :  04:13:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Here is the script that I should receive after fitting:

Equation: double F = *lpValue;
double SzF2 = S*S/(F*F);
double dRR;
double rhoBar2 = Pu_s_Pr*Pu_s_Pr;
if(F<S)
{
dRR = 2*F/((1+1/rhoBar2)*(3*S));
}else
{
dRR = 1 - SzF2;
dRR+= 2*(pow(S/F,rhoBar2)-SzF2)/(rhoBar2-2);
dRR+= ( (6*pow(S/F,rhoBar2))/(1+1/rhoBar2)-2*SzF2*rhoBar2)/(6-3*rhoBar2);
}
dRR+=koef*F;
dRR*= Lam/4;
Weighting:
y No weighting

Chi^2/DoF = 450.24124
R^2 = 0.99427

S 118.86398 ±60.25857
PuSPr 1.25 ±0
Lam 10237.13021 ±36265.38417
koef -0.00158 ±0.00482
Go to Top of Page

Shirley_GZ

China
Posts

Posted - 07/26/2016 :  04:41:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi lsm85,

We have already have a sample shipped with Origin to show you how to create the DLL, import it into Origin and then use it to create the user fitting function.

Please follow the instruction below to install this sample:
http://www.originlab.com/doc/Origin-Help/NLFit-ExternalDLL

Once you installed this opx, there will be a PDF file under the folder <User File Folder>/Fitting with External DLL, which will show you all details about using external dll to create fitting function.

With this PDF, please firstly confirm that you have created the DLL in the right way. And then follow from step 7 in page 3 to learn how to import the DLL in Origin and use it to define fitting function.

Any problem, please feel free to contact us.

Thanks,
Shirley

Originlab Technical Service Team
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