Parameter a,k,c,b,g;
ConstStr f=a*(k*exp(c-b*t(i))*b)/(1+exp(c-b*t(i)))^2;
Variable t,z[OutPut],y;
StartProgram [Basic];
Sub MainModel
Dim as integer i, j, n
Dim as double temd1, temd2
for i = 0 to DataLength - 1
n = t(i)
temd1 = 0
for j = 0 to n
temd1 = temd1 + f
next
temd2 = 0
for j = 0 to n
temd2 = temd2 + g*y(j)
next
z(i) = temd1 + temd2
Next
End Sub
EndProgram;
Data;
t=[0,2,4,6,8,10,12,14,16,18,20,22,24];
z=[0,0,666.6,5333.33,10666.6,21333,42666.6,4666.6,42666.6,42666.6,42666.6,42666.6,85333.3];
y=[1.25*10^8,1.*10^8,1.25*10^8,2.2*10^10,1.3*10^11,1.4*10^11,1.25*10^11,4.7*10^10,7.9*10^10,9.5*10^10,9.4*10^10,8.8*10^10,9.4*10^10];
Root of Mean Square Error (RMSE): 9901.69220512954
Sum of Squared Residual: 1274565610.8266
Correlation Coef. (R): 0.918681151445272
R-Square: 0.84397505802081
Adjusted R-Square: 0.791966744027747
Determination Coef. (DC): 0.841498837497943
F-Statistic: 9.7840155772957
Parameter Best Estimate
-------------------- -------------
a -277156.527610417
k -10698197.9029827
c 28.5533367811484
b 0.35649699061682
g 3.06293808255498E-8
4 Comments
KALYAN ACHARJYA (view profile)
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/490586-how-to-curve-fit-following-summation-equation-in-matlab-with-given-experimental-data#comment_766319
abxz (view profile)
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/490586-how-to-curve-fit-following-summation-equation-in-matlab-with-given-experimental-data#comment_766322
abxz (view profile)
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/490586-how-to-curve-fit-following-summation-equation-in-matlab-with-given-experimental-data#comment_766596
KALYAN ACHARJYA (view profile)
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/490586-how-to-curve-fit-following-summation-equation-in-matlab-with-given-experimental-data#comment_766727
Sign in to comment.