Bonsoir,
Excusez moi si cette question a été posé auparavant. S'il vous plait j'aimerais bien faire une régression logarithmique avec matlab, mais j'ai pas trouvé la bonne commande.
Est ce que quelqu'un pourrait m'aider?
Merci à l'avance.
Bonsoir,
Excusez moi si cette question a été posé auparavant. S'il vous plait j'aimerais bien faire une régression logarithmique avec matlab, mais j'ai pas trouvé la bonne commande.
Est ce que quelqu'un pourrait m'aider?
Merci à l'avance.
?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 x = [0.15,0.4,0.6,1.01,1.5,2.2,2.4,2.7,2.9,3.5,3.8,4.4,4.6,5.1,6.6,7.6]; y = [4.5,5.1,5.7,6.3,7.1,7.6,7.5,8.1,7.9,8.2,8.5,8.7,9.0,9.2,9.5,9.9]; c = polyfit(log(x),log(y),1) % linear regression in logarithmic axis xInt = linspace(x(1),x(length(x)),100); yInt = exp(c(2))*xInt.^(c(1)); plot(x,y,'g*',xInt,yInt,'b'); % nonlinear regression in (x,y) loglog(x,y,'g*',xInt,yInt,'b'); % linear regression in (logx,logy)
![]()
Partager