vector valued guess parameter in fitting function
显示 更早的评论
I would like to fit a function of the form (in myfunc):
ydata = x(1) + ((1 - x(2) - x(3) * log(xdata/f))/v)
to a set of data (using lsqcurvefit or lsqnonlin). the input: ydata is a vector, xdata a matrix. I want to get an estimate of parameter x(2) and x(3) which are constants. x(1) is a constant for every entry of xdata and ydata, meaning it has the same dimension as xdata and ydata, but at some entries I know it is zero beforehand. Does one of the matlab functions allow x(1) to vary with different datapoints? And if so, how do I have to code it in myfunc? All the examples I found so far do not match my problem and I don't know how to call lsqnonlin correctly. Thank you in advance for your help.
sandra
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Choose a Solver 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!