From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14865 invoked by alias); 29 Jan 2004 19:01:11 -0000 Mailing-List: contact gsl-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sources.redhat.com Received: (qmail 14499 invoked from network); 29 Jan 2004 19:00:52 -0000 Received: from unknown (HELO mail.ukfsn.org) (217.158.120.143) by sources.redhat.com with SMTP; 29 Jan 2004 19:00:52 -0000 Received: from localhost (unknown [80.43.117.182]) by mail.ukfsn.org (Postfix) with ESMTP id 7C10CE6A7F; Thu, 29 Jan 2004 18:58:55 +0000 (GMT) Received: by localhost with local (Exim 3.35 #1 (Debian)) id 1AmHPG-0000zN-00; Thu, 29 Jan 2004 19:00:50 +0000 From: Brian Gough MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <16409.22626.301509.456283@debian.local> Date: Thu, 29 Jan 2004 19:01:00 -0000 To: Cc: gsl-discuss@sources.redhat.com Subject: Re: linear system problem In-Reply-To: <20040129151306.86F47E6A8D@mail.ukfsn.org> References: <20040129151306.86F47E6A8D@mail.ukfsn.org> X-SW-Source: 2004-q1/txt/msg00034.txt.bz2 e70443@estudiante.uam.es writes: > I need to solve the linear system A x =3D b, where A is a rectangular > M-by-N matrix, and M > N. Looking the functions of the library, I > decided to use de QR descomposition. Before any calculation, I > create the A matrix and b vector view, the 'x' and 'tau' vectors of > N size, and the 'residual' vector of M size. > First, I call the function gsl_linalg_QR_decomp() with the matrix > A and the vector 'tau'. Then I call the gsl_linalg_QR_lssolve() > function with the arguments A (with the QR descomposition created > by the previous function), tau, b, x, and residual, to find the > solution to the linear > system. I=B4m almost sure that these equations are correct but the > solution is not. What should I expect ? My question is; am I > either using the right functions, or puting them in > the right order? > Shall I use another kind of descomposition? Hi, Using the method of QR decomposition with lssolve as you describe it should work. See the program linalg/test.c for the lssolve example in the test suite. I would suggest printing out the matrices at each stage and checking their values to see where the problem is occurring. You can check the results in GNU Octave, for example. If you can find a simple case where it fails please post the code as a bug report to bug-gsl@gnu.org. regards --=20 Brian Gough