help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] non-equal spacing data in nonlinear least squares fitting


From: Patrick Alken
Subject: Re: [Help-gsl] non-equal spacing data in nonlinear least squares fitting
Date: Thu, 10 Dec 2015 15:30:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

You would provide the t_i values in the "struct data" parameter in that example. So you could add another array: double * t; into struct data and supply your t values in there.

Patrick

On 12/10/2015 11:06 AM, Xeelee Xeelee wrote:
Hi,

I need to fit a data set in the form of { t ,f(t) }
(t is the argument f(t) is the value of function at t):

t_0, y_0
t_1,  y_1
...  ,  ...
t_n,  y_n

but the t_i is not equally spaced, e.g.
T_my = {t_0, t_1, t_2, ...} = {0.1, 0.2, 0.4, 0.45, 0.7, 1.1, 1.21, ...}

In the example program:
http://www.gnu.org/software/gsl/manual/gsl-ref.html#Example-programs-for-Nonlinear-Least_002dSquares-Fitting

The input data is simply in the form
T_eg = {t_0, t_1, t_2, ...} = {0, 1, 2, 3, 4, 5, 6, 7, ....}
and {y_0,....,y_n}

Is there any place to provide T_my to the fitting program?

Thanks a lot,

X.N.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]