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...

採用された回答

Matt J
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 件)

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by