This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: constrain on nonlinear least-squares fitting
Fiaschi writes:
> How I can limit the range of one or more parameters on nonlinear
> least-squares fitting algorithm?
>
> I must fit a one-dimensional array with a simple generic sinusoidal function
> I(t)=B+A*sin(omega*t+phi) but the parameters A and B must be always >0 and
> 0<phi<pi
GSL doesn't have any routines for constrained minimisation. The only
way is to use a penalty function with a large value outside the
desired region.