Curve fitting tool with 4 variables

조회 수: 14 (최근 30일)
Yueqian Ma
Yueqian Ma 2019년 5월 7일
댓글: Alex Sha 2019년 12월 6일
I'm trying to predict soil respiration using 4 known vectors (x, y, z, and k) using the equation:
k = a*exp(b*x)*exp(c*y+d*y^2)+e*z+f
I tried looking online, but each problem uses 2 or 3 variables from the curve fitting tool. How can I do 4 variables?
Thanks in advance for any help.

답변 (3개)

Alex Sha
Alex Sha 2019년 5월 24일
Attach your data file please.
  댓글 수: 2
Mahesh Karki
Mahesh Karki 2019년 5월 27일
편집: Mahesh Karki 2019년 5월 27일
Hi Alex,
I have the same question and I have attached the data file below.
Here,
X1, X2 and X3 are the Independent Variable while Y1 is the dependent Variable and I don't have the fit equation.
I have also read the Matlab answers in similar topics, link atatched below:
Do you have any suggestions?
Mahesh
Yueqian Ma
Yueqian Ma 2019년 5월 27일
편집: Yueqian Ma 2019년 5월 27일
Like what the previous comments said, if you don't have a model, then you can't find any unknowns within the equation because there's literally an infinite amount of fits. I suggest you use the regression learner app in matlab to train and find a suitable model.

댓글을 달려면 로그인하십시오.


Alex Sha
Alex Sha 2019년 5월 28일
Hi, Mahesh, if you don't care the formation of the fitting equation, try the follows:
y = sin((((((p1-x3)^2)*x3)/(((x3^2)^(x2^p2))/exp(sin(((p3/(1+x3)^0.5)/(1+p4/x1))/(p5/(1-x3))))))*((1+x1)^0.5+x2^2))/(1/(p6-x2)^2))-(1/(p7+x2)-(1+p8/x3)+(x1+1)^p9);
Root of Mean Square Error (RMSE): 0.000948905304490633
Sum of Squared Residual: 1.08050553226855E-5
Correlation Coef. (R): 0.999562780052203
R-Square: 0.999125751265689
Adjusted R-Square: 0.998626180560369
Determination Coef. (DC): 0.999121540217668
Chi-Square: 1.52267545487959E-5
F-Statistic: 428.261316945475
Parameter Best Estimate
---------- -------------
p1 4.60817694964176
p2 0.774217015206445
p3 -125.052492026267
p4 98.1254106271433
p5 0.61282127680523
p6 2133.5891967895
p7 -7.82339269347936
p8 -2.25961768228283
p9 -0.56287172661848
c161.jpg
  댓글 수: 1
Mahesh Karki
Mahesh Karki 2019년 5월 28일
편집: Mahesh Karki 2019년 5월 28일
Hi Alex,
Thanks for your solution, I am interested to know how you find the fit equation, can you share the script.
Mahesh

댓글을 달려면 로그인하십시오.


Ashok Kurakula
Ashok Kurakula 2019년 12월 6일
편집: Ashok Kurakula 2019년 12월 6일
Hi Alex,
Appriciate !!
In whole seach of mine, I didn't see one helping curve fitting more than 3 variables, you are the one who puts up sollution.
I do have the similar work for dynamically varing data, since data would keep chaging single equation wouldn't help me. I have 3 indipent variables and 1 dependent variable.
Great, if you could help me here. I would not need the code as on, but path to get a solution for my problem.
Thanks & Regards,
Ashok Kurakula.

카테고리

Help CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by