Curve fitting tool with 4 variables

13 次查看(过去 30 天)
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