help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Spline coefficients


From: Patrick Alken
Subject: Re: [Help-gsl] Spline coefficients
Date: Tue, 2 Oct 2007 09:59:25 -0600
User-agent: Mutt/1.4.2.2i

Hi,

  Using that example program, you could write the coefficients to
a file such as:

gsl_vector_fprintf(file_p, c, "%.12e");

where the coefficients are stored in 'c'. If you want to later
use the function gsl_multifit_linear_est you will also need to store
the matrix 'cov' and read it back later. However 'cov' is primarly
used for computing the error in the model so if you only want the
model value you don't need that matrix. Look at the source for
gsl_multifit_linear_est for more info.

On Tue, Oct 02, 2007 at 04:10:46PM +0200, Paolo Franzetti wrote:
> Hello all,
> 
> For the purposes of a piece of software I am writing I have
> to perform a "linear least squares fit to data using cubic B-spline
> basis functions with uniform breakpoints" which is exactly what is done
> in the example code:
> 
> http://www.gnu.org/software/gsl/manual/html_node/Example-programs-for-B_002dsplines.html
> 
> This code works really fine for me, but I have a further problem.
> I need to store the fit results in an output file to be used by other 
> programs
> to recover the best-fitting curve.
> 
> Which is the best way to to this ?
> How many coefficients I have to store and how is the best way to reload
> them in a new program ?
> 
> Thanks in advance for any help,
> Paolo
> 
> 
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
> 




reply via email to

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