[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Nonlinear Least-Squares Fitting
From: |
Jeremy Theler |
Subject: |
Re: [Help-gsl] Nonlinear Least-Squares Fitting |
Date: |
Wed, 17 Apr 2019 11:37:11 -0300 |
User-agent: |
Evolution 3.30.5-1 |
I have written a tool that provides a (relatively) "high-level" access
to GSL by using an input text file. You can see that same rewritten
using my tool and reading the data from a textfile example here
https://www.seamplex.com/wasora/realbook/real-020-gsl.html#nlfit.was
The tool, which is GPLv3+, can be obtained here
https://www.seamplex.com/wasora
If you still need to read the a two-columns text file into two C
arrays, you should be searching on stackoverflow or so.
Regards
--
jeremy theler
www.seamplex.com
On Wed, 2019-04-17 at 07:46 +0000, Lawrence Habahbeh wrote:
> Hi,
>
> In the online [Docs](
> https://www.gnu.org/software/gsl/doc/html/index.html
> ) ยป Nonlinear Least-Squares Fitting, there is an example of fitting
> an exponential function to data. The data object is a structure with
> three arguments
> struct data {
> size_t n;
> double *t;
> double *y;
> };
>
> Can you please show me how to read the data from a text file and run
> the optimization as is. . The data is a column vector with daily
> observations and T = 120000 points .
>
> Kind regards,
>
> Sent with [ProtonMail](
> https://protonmail.com
> ) Secure Email.