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