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!