[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] AX=B octave vs gsl

From: Awhan Patnaik
Subject: [Help-gsl] AX=B octave vs gsl
Date: Wed, 8 Sep 2010 08:01:23 +0530

Hello all

I am trying to solve for X in AX=B where A, B, X are all matrices.
A is a symmetric 15x15 matrix
X is the unknown 15x30 matrix
B is of course 15x30 matrix.

condition number c of A calculated in Octave is 3.2532e+06.

A matrix data can be obtained here
Can be loaded in octave using

B matrix data can be obtained here
Can be loaded in octave using

I solved for X using LU method with refinement using this code:

Please ignore the read() and write() function in my C++ file as well
as utils.h. I show the C++ file just to show the method used and get
verification if I am doing it right.

I also solve this problem in Octave and am surprised at the great
accuracy obtained in Octave. Let X_gsl be the solution obtained using
LU in GSL and let X_oct be the octave solution obtained using A\B

norm(A*X_oct - B) = 6.6081e-11

norm(A*X_gsl - B) = 0.13395

Aslo I find the residuals calculated in the LU refinement step are of
the order of 1e-7 so not much improvement actually occurs.

Octave solution can be obtained here

GSL+LU solution can be obtained here

What can I do to get as much accuracy as the Octave method?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]