This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Problem with least-squares fitting.
- From: Kenneth Geisshirt <kenneth at geisshirt dot dk>
- To: "gsl-discuss at sources dot redhat dot com" <gsl-discuss at sources dot redhat dot com>
- Date: Tue, 5 Nov 2002 10:16:20 +0100 (CET)
- Subject: Re: Problem with least-squares fitting.
- Reply-to: kenneth at geisshirt dot dk
On Mon, 4 Nov 2002, Tiago de Paula Peixoto wrote:
> subvector_source.c:28: vector length n must be positive integer
> (gsl_error: invalid argument supplied by user)
>
> The fit results seem OK, and I don't know what I'm doing wrong. When I fit
> with 2 parameters or more, everything works fine.
>
> I'm sending a small program attached that exemplifies the problem.
I have compiled the example on Debian Woody (3.0) using gcc 2.95.4 and gsl
1.1.1 and I get the exact same error message.
The calling stack is:
#0 least_gsl_error_handler (
reason=0x4019be80 "vector length n must be positive integer",
file=0x4019be4e "subvector_source.c", line=28, gsl_errno=4)
at least_test.c:11
#1 0x4008fc92 in gsl_error () from /usr/lib/libgsl.so.0
#2 0x40169857 in gsl_vector_subvector () from /usr/lib/libgsl.so.0
#3 0x400ba859 in gsl_linalg_SV_decomp () from /usr/lib/libgsl.so.0
#4 0x400bb4c4 in gsl_linalg_SV_decomp_mod () from /usr/lib/libgsl.so.0
#5 0x400ea171 in gsl_multifit_linear () from /usr/lib/libgsl.so.0
#6 0x080489a5 in main () at least_test.c:50
My hypothesis: fitting 1 parameter using multifit is "not nice to do".
Kneth
--
Kenneth Geisshirt, M.Sc., Ph.D. http://kenneth.geisshirt.dk
Grøndals Parkvej 2A, 3. sal kenneth@geisshirt.dk
DK-2720 Vanløse +45 38 87 78 38