Curve fitting of two equations
Show older comments
Hello,
I have two equations
f=0:0.2:3;
y=teta*exp((a+1)*f);
x=exp((a-1)*f-1)/(a-1)^2;
I have a set of x vs. y
x=[36.78 ,37.53 ,38.28 ,39.06 ,39.85 ,40.65 ,41.47 ,42.3162082317748,43.17 ,44.04 ,44.93 ,45.84 ,46.76 ,47.71 ,48.67 ,49.65 ]
y=[0.01 ,0.0152 ,0.023 ,0.035,0.0536 ,0.0816 ,0.12 ,0.1891 ,0.287 ,0.438 ,0.6668 ,1.01494 ,1.544 ,2.35097424365239,3.578 ,5.445 ]
and I want to fit the data points and find out the constants teta,a.
I will appreciate any help.
Thanks
1 Comment
Alex Sha
on 6 Dec 2019
refer to the results below:
Root of Mean Square Error (RMSE): 0.00236810622550458
Sum of Squared Residual: 0.000179453667048754
Correlation Coef. (R): 0.9999997274333
R-Square: 0.999999454866675
Adjusted R-Square: 0.999999318583346
Determination Coef. (DC): 0.999999412360353
F-Statistic: 21897434.6722157
Parameter Best Estimate
-------------------- -------------
teta 0.0099986478526145
a 1.100005339318


Accepted Answer
More Answers (1)
Walter Roberson
on 25 Feb 2016
You do not have two equations: each value of f generates another pair of equations.
It appears there might be two solutions for teta
teta1 = mean( exp((1/2)*(-f^2+2*x*ln(y)+sqrt(f^4-4*f^2*x))/x) )
teta2 = mean( exp((1/2)*(-f^2+2*x*ln(y)-sqrt(f^4-4*f^2*x))/x) )
a = mean( (ln(y)-ln(teta)-f)/f ) for teta = teta1 and teta = teta2
No proof offered at this time; my eyes are giving me trouble.
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!