T O P I C R E V I E W |
Tejaswi |
Posted - 04/14/2021 : 06:10:20 AM Hello all, I am trying to fit my experimental data of bio-H2 production into modified gompertz.
The equation I want to use is
y = H*exp(-exp(((H*2.718)/H)*(l-t)+1))
Here H is the maximu cumulative Hydrogen Y is the amount of hydrogen that is calculated at a given time
I created a duplicate version of the existing gompertz equation and modified the C program. I have "x" as independant variable and "y" as dependant variable. The parameters are H, R,l,t
When I try to fit the equation, it does not calculate the values of y when I check the report. It shows an error saying "Fit failed (-207)"
I tried making modifications in the program and it shows an error. Any help in regards to programming and fitting the datas is appreciated.
Thanks and Regards, Tejaswi
|
3 L A T E S T R E P L I E S (Newest First) |
AmandaLu |
Posted - 04/20/2021 : 10:47:16 PM Hi Tejaswi,
The OC code is used to calculate the initial values of parameters. Y doesn’t need a initial value to fit. If you want to fit Y with your defined function, you can select Analysis: Fitting: Nonlinear Curve Fit menu. In the dialog, select your defined function and fit your XY data.
Thanks, Amanda OriginLab Technical Service
|
Tejaswi |
Posted - 04/15/2021 : 1:19:43 PM Hi, I corrected the equation. y=H*exp(-exp(((R*2.718)/H)*(l-t)+1))
and the C program I modified is :
sort( x_y_curve ); //smooth( x_y_curve, 2 ); H = max(y_data); x_y_curve = ln( x_y_curve ); x_y_curve = ln( ln(H) - x_y_curve ); double coeff[2]; fitpoly( x_y_curve, 1, coeff ); R= -coeff[0] / coeff[1]; l = -coeff[1];
I am not sure how I can write a code to calculate the values of Y.
Regards, Tejaswi. |
AmandaLu |
Posted - 04/14/2021 : 06:41:05 AM Hi,
First of all, please make sure you defined the function correctly. For example, I don’t see a parameter “R” in the function you mentioned.
Secondly, "Fit failed (-207)" means “Fit did not converge, for some other unknown reason(s).” https://www.originlab.com/doc/Origin-Help/NLFit-Result-FitStatusCode
You can refer to this page for a possible reason: https://www.originlab.com/doc/Origin-Help/The_Reason_Why_Fail_to_Converge
Thanks, Amanda OriginLab Technical Service
|
|
|