拟合练习:1 function f = curvefun(x, tdata)2 f = (x(1)*x(2)*x(3)) / (x(3)-x(2)) * ( exp(-x(2)*tdata)/(x(4)-x(2)) + exp(-x(3)*tdata)/(x(4)-x(3)) - (1/(x(4)-x(2))+1/(x(4)-x(3)))*exp(-x(4)*tdata) ); 1 %数据输入 2 tdata = [0.25 0.5 0.75 1 1.5 2 2.5 3 3.5 4 4.5 5 6 7 8 9 10 11 12 13 14 15 16]; 3 vdata = [30 68 75 Read More
方法一:直接用多元二项式回归1 %数据输入2 x1 = [1000 600 1200 500 300 400 1300 1100 1300 300];3 x2 = [5 7 6 6 8 7 5 4 3 9];4 %多元二项式回归函数5 y = [100 75 80 70 50 65 90 100 110 60];6 X = [x1' x2'];7 Y = y';8 rstool(X, Y, 'purequadratic', 0.05);%使用纯二次模型结果:方法二:化为多元线性回归1 %数据输入2 x1 = [1000 600 1200 500 300 Read More