Hello,
The following snippet doesn't work, yelling at me that gsl_spline_alloc
and gsl_spline_init have been passed different lengths.
As far as I can tell from the code, it's impossible to do this. (I'm
only interested in the case of newnbins<nbins).
A) Can anyone tell me if I'm correct in this or provide a way to
accomplish this without freeing and re'alloc?
B) Would there be something wrong with writing it in this manner so long
as an error is returned from gsl_spline_init if newnbins > nbins?
{
int nbins = 100;
gsl_spline *vmax_spl;
gsl_interp_accel *vmax_spa;
vmax_spa = gsl_interp_accel_alloc();
vmax_spl = gsl_spline_alloc( gsl_interp_cspline, nbins );
int newnbins = 50
gsl_spline_init( vmax_spl, &lrvals[0], &vvals[0], newnbins );
...
gsl_spline_free(vmax_spl);
gsl_interp_accel_free(vmax_spa);
}
_______________________________________________
Help-gsl mailing list
Help-gsl@gnu.org
https://lists.gnu.org/mailman/listinfo/help-gsl