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
 All Forums
 Origin Forum
 Origin Forum
 problem in compiling user-defined function

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
huaqiangz Posted - 04/01/2008 : 06:26:18 AM
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]


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000