T O P I C R E V I E W |
huaqiangz |
Posted - 04/01/2008 : 06:27:14 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]
|
1 L A T E S T R E P L I E S (Newest First) |
larry_lan |
Posted - 04/02/2008 : 02:04:42 AM Hi:
To check the correctness of fitting function, please use Origin C to define the fitting function, and then compile it.

Define the function like:
y=P1 + P2*(1+1/(2*P3*x) - sqrt(pow(1/(2*P3*x), 2) + 1/(P3*x)));
And use these values to initialize your parameters.
P1 = 10; P2 = 0.001; P3 = -1;
Thanks Larry OriginLab Technical Services |
|
|