问题描述:
matlab
我用的lsqcurvefit进行拟合,代码如下:x=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
];y=[148 149 150 151 153 155 156 154 146 129 102 69 51 44 43 41 41 43 43 43];c0=[1 1 1 1];
x=lsqcurvefit('feimi',c0,xdata,y);feimi文件的内容如下
function f = feimi(c,xdata)
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
f=c(4)/(exp((xdata-c(2))/c(3))+1)+c(1);
% f=c(1)*xdata+c(2)*xdata*xdata+c(3)*xdata*xdata*xdata+c(4);
end
为啥有错误呢,应该怎么改呢
我用的lsqcurvefit进行拟合,代码如下:x=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
];y=[148 149 150 151 153 155 156 154 146 129 102 69 51 44 43 41 41 43 43 43];c0=[1 1 1 1];
x=lsqcurvefit('feimi',c0,xdata,y);feimi文件的内容如下
function f = feimi(c,xdata)
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
f=c(4)/(exp((xdata-c(2))/c(3))+1)+c(1);
% f=c(1)*xdata+c(2)*xdata*xdata+c(3)*xdata*xdata*xdata+c(4);
end
为啥有错误呢,应该怎么改呢
问题解答:
我来补答展开全文阅读