Hi

I need to calculate inv(A) . B where A,B are matrices.

The gsl doc on gsl_linalg_LU_invert says in
http://www.gnu.org/software/gsl/manual/html_node/LU-Decomposition.html

> It is preferable to avoid direct use of the inverse whenever possible, as the 
> linear solver functions can obtain the same result more efficiently and 
> reliably (consult any introductory > textbook on numerical linear algebra for 
> details).

Does gsl have a nice wrapper function to do this for given matrices A and B.

One way I can think of is to use,

 gsl_linalg_LU_solve (&m.matrix, p, &b.vector, x);

as explained in

http://www.gnu.org/software/gsl/manual/html_node/Linear-Algebra-Examples.html

I would need to find the solution vector x for each col vector b (of
matrix B) and and concatenate the x vectors to obtain my inv(A).B
matrix.

Is there a better / more direct approach that is more numerically
stable and accurate ?

Thanks

Srimal

-- 
~
Srimal Jayawardena
BSc (Engineering), BIT, MIET
PhD Student, Australian National University.

Phone(Mobile): +61 422 684 854
Phone(Office) : +61 2 6125 1771
Phone(Home) : +61 2 6125 1413
Fax                 : +61 2 6125 8651

ANU Contact Info : http://arp.anu.edu.au/user/3788

http://srimal.sri-lankan.net/
http://srimal-techdiary.blogspot.com/


_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to