MATLAB: For loop with least square curve fit matlab

least square curve fit

Hi every ones is it possible to work with for loop when using least square curve fit in matlab thnx in advance
[Inappropriate ANSWER text moved to BODY as does actually (finally) give some input as to what is the question…dpb]
I've create[d] a function called func2 (to fit s[o]me experimental data) say that this function can be writing as follow:
yi=func2(xi)=2n+3
(xi is the input, yi is the output) and
n=f(xi,A,B)
A and B are constants.
I want to find A and B at each value of xi using the for loop with the lsqcurvefit fit method.

Best Answer

yes