Curve fitting tool with 4 variables

30 ビュー (過去 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.
  1 件のコメント
Alex Sha
Alex Sha 2019 年 12 月 6 日
My Pleasure

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by