No. nlinfit is entirely adequate.
However, it would seem that learning to write valid MATLAB syntax would help. It seems that you think it is correct to randomly insert . (dots) everywhere, sprinkling them with wild abandon.
model=@(b,x) ( x(:,1).*b(1). )/ ( x(:,2).+ b(2).);
For example, why have you placed a dot immediately after b(1)? After b(2)? After x(:,1)? After x(:,2)?
I think you misunderstand when to use a dot, and what it does. The . is used in three places, to create element-wise multiplies, divides, and powers.
My guess is that you think for some reason, that you need to have a . after a variable name? Wrong, completely so.
A dot is part of an operator, here .*, ./, and .^, although the last is not used in your code.
help times
help slash
help power
Best Answer