I want to find the coefficients for the regression equation using nonlinear regression analysis.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Matt J
le 21 Août 2020
Modifié(e) : Matt J
le 21 Août 2020
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Linear Regression dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!