I want to find the coefficients for the regression equation using nonlinear regression analysis.
1 次查看(过去 30 天)
显示 更早的评论
We want to find the coefficients for the regression equation using nonlinear regression analysis.
For example
M=3, 3, 3, 3, 4, 4, 4, 4
R=0, 10, 20, 30, 0, 10, 20, 30
The corresponding (M,R)=SA and the SA value is not calculated, but I enter it.
SA=5, 10, 20, 16, 15, 10, 30, 13
In other words
(3,0)=5
(3,10)=10
(3,20)=20
(3,30)=16
(4,0)=15
(4,10)=10
(4,20)=30
(4,30)=13
Using this data, I want to find the coefficients a, b, c, and d that satisfy the regression equation SA=a*M+b*log(R+c)+d. How to try...
0 个评论
采纳的回答
Matt J
2020-8-21
编辑:Matt J
2020-8-21
fminspleas from the file exchange
would be particularly appropriate,
M=[3, 3, 3, 3, 4, 4, 4, 4].';
R=[0, 10, 20, 30, 0, 10, 20, 30].';
SA=[5, 10, 20, 16, 15, 10, 30, 13].';
MR=[M,R];
funlist={ @(c,mr) mr(:,1) , @(c,mr)log(mr(:,2)+c), 1 };
[c,abd]=fminspleas(funlist,0,MR,SA,0);
[a,b,c,d]=deal(abd(1),abd(2), c, abd(3))
a =
4.2500
b =
5.6953
c =
7.4083
d =
-16.7902
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!