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
 problem in compiling user-defined function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

huaqiangz

Singapore
Posts

Posted - 04/01/2008 :  06:26:18 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin):Origina 7.5
Operating System: XP Professional

Try to fit the data according to the following equation, always ended up with error 28037 (likely caused by errors in user defined formula or poor parameter initialization). Please HELP.

yy=P1 + P2*(1+1/(2*P3*xx) - sqrt(1/(2*P3*xx)^2 + 1/(P3*xx)))

The first column is xx and second column is yy. three parameters are P1, P2 and P3

8.3E-4 8.893
0.0014 9.116
0.00208 9.198
0.00415 9.327
0.0083 9.435
0.015 9.52
0.0208 9.55
0.0415 9.608
0.083 9.638


The contents are as follows (I modified it according to the fitting equation already in the origin)

[GENERAL INFORMATION]
Function Name=DimerDilution2
Brief Description=
Function Source=Dimer Dilution.DimerDilution2
Function Type=User-Defined
Function Form=Equations
Number Of Parameters=3
Number Of Independent Variables=1
Number Of Dependent Variables=1
Analytical Derivatives for User-Defined=On


[FITTING PARAMETERS]
Naming Method=User-Defined
Names=P1,P2,P3
Meanings=extreme chemical shift, maximum in chemical shift, association constant
Initial Values=
Lower Bounds=--,--,--
Upper Bounds=--,--,--
Number Of Significant Digits=


[FORMULA]
yy=P1 + P2*(1+1/(2*P3*xx) - sqrt(1/(2*P3*xx)^2 + 1/(P3*xx)))


[CONSTRAINTS]



[CONSTANTS]


[Parameters Initialization]
/*Code to be executed to initialize parameters.*/


[INITIALIZATIONS]
/*Code to be executed before fitting, a good place for complicated initialization.*/


[AFTER FITTING]
/*Code to be executed after fitting, a good place for generating results.*/


[ON PARAM CHANGE]
/*Code to be executed when parameters change.*/


[INDEPENDENT VARIABLES]
x=


[DEPENDENT VARIABLES]
y=


[CONTROLS]
General Linear Constraints=Off
Initialization Scripts=Off
Scripts After Fitting=Off
Number Of Duplicates=N/A
Duplicate Offset=N/A
Duplicate Unit=N/A
Generate Curves After Fitting=Yes
Curve Point Spacing=Uniform on X-Axis Scale
Generate Peaks After Fitting=Yes
Generate Peaks During Fitting=Yes
Generate Peaks with Baseline=Yes
Paste Parameters to Plot After Fitting=Yes
Paste Parameters to Notes Window After Fitting=Yes
Generate Residuals After Fitting=No
Keep Parameters=No
Enable Parameters Initialization=N/A
Compile On Param Change Script=1


[COMPILE FUNCTION]
Compile=0
Compile Parameters Initialization=1
On Param Change Scripts Enabled=N/A


[ORIGIN C FUNCTION HEADER]



[ORIGIN C PARAMETER INITIALIZATION HEADER]

  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