Hi,
This is just a problem of variable scope, "g" is used internally by
datafit, likely. All user parameters or functions used in G should be
given by using a list, i.e. :
function e=G(p, z, g)
option = 1
select option
case 1
gg = p(1) + p(2)*abs(z(1)).^p(3) -
Hello,
looks like a conflict with internals or bug,
changing the function name of "g" will solve the problem.
Best regards
J.K.
st 8. 9. 2021 o 0:18 Federico Miyara napísal(a):
>
> Dear all,
>
> I have a problem using datafit() to adjust the parameters of a model. The
> script below has
Dear all,
I have a problem using datafit() to adjust the parameters of a model.
The script below has four parts. The first one actually is a synthesis
of the data I'm working with. It just creates the data (logf0, Te) to model.
The second part introduces the function g(x, p) to model the