This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with least-squares fitting.


Hello.

 I'm experiencing a weird error message using the GSL linear least squares
multi-parameter fitting. When I try to fit a function with only one
parameter, such as "y = a * x", I get the following error:

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'm using GSL 1.2.

Thanks for any help.

-- 

    Tiago

Attachment: least_test.c
Description: Binary data

Attachment: msg00102/pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]