* linear system problem
@ 2004-01-29 15:14 e70443
0 siblings, 0 replies; 2+ messages in thread
From: e70443 @ 2004-01-29 15:14 UTC (permalink / raw)
To: gsl-discuss
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]
Dear sirs,
I am a student of Computer Engineering at Madrid
University, Spain.
First of all I want to congratulate you for the
very useful "Scientific Library GSL" you have.
The matter that concerns me is:
I need to solve the linear system A x = 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´m 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?
Thank you very much for your cooperation
Sincerely,
Jaime Carsi Jaudenes.
---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: linear system problem
[not found] <20040129151306.86F47E6A8D@mail.ukfsn.org>
@ 2004-01-29 19:01 ` Brian Gough
0 siblings, 0 replies; 2+ messages in thread
From: Brian Gough @ 2004-01-29 19:01 UTC (permalink / raw)
To: e70443; +Cc: gsl-discuss
e70443@estudiante.uam.es writes:
> I need to solve the linear system A x = 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´m 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
--
Brian Gough
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-29 19:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-29 15:14 linear system problem e70443
[not found] <20040129151306.86F47E6A8D@mail.ukfsn.org>
2004-01-29 19:01 ` Brian Gough
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).