[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] fitting
From: |
Petr Ent |
Subject: |
[Help-gsl] fitting |
Date: |
Tue, 31 Oct 2006 22:37:46 +0100 (CET) |
hi everyone,
is it possible to do following thing with non-linear least squares fitting...?
double x_init[3] = { 1.0, 0.0, 0.0 };
gsl_vector_view x = gsl_vector_view_array (x_init, p);
T = gsl_multifit_fdfsolver_lmsder;
s = gsl_multifit_fdfsolver_alloc (T, n, p);
for ( int i = 0; i < 100 000; i++ )
gsl_multifit_fdfsolver_set (s, &f, &x.vector);
do
{
iter++;
status = gsl_multifit_fdfsolver_iterate (s);
if (status)
break;
status = gsl_multifit_test_delta (s->dx, s->x,1e-4, 1e-4);
}
while (status == GSL_CONTINUE && iter < 500);
end of for cycle
or another way .... is it possible to allocate solver, create vector from
x_init, set this to solver and let it do its job in loop (with same x_init
vector)? does it somehow change the original x_init vector?
thank you in advance
best regards
Petr Ent
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-gsl] fitting,
Petr Ent <=