一元线性回归
非线性线性化常用曲线
画图代码(不太正确)
clear,clc
a = 2,b = 3,e =2.718281828459;
x = 0 : 0.1 :300;
for i = 1:3000
y(i) = 1/( a+b/x(i) );
end
subplot(2,3,1),plot( x(2:3001),y ),title('双曲线 1/y = a + b/x');
for i = 1:3000
y(i) = a*x(i)^b;
end
subplot(2,3,2),plot( x(2:3001),y ),title('幂函数曲线 y = ax^b');
for i = 1:3000
y(i) = a*e^(b*x(i));
end
subplot(2,3,3),plot( x(2:3001),y ),title('指数曲线 y = a*e^(b*x)');
for i = 1:3000
y(i) = a*e^(b/x(i));
end
subplot(2,3,4),plot( x(2:3001),y ),title('倒指数曲线 y = a*e^(b/x)&#