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]

Re: Inverse of a matrix


Hi,

>From your code:

	gsl_linalg_LU_decomp(A, p, &signum);
	gsl_linalg_LU_invert(A, p, B);

	gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1, A, B, 0, C);

>From the manual for gsl_linalg_LU_decomp:

On output the diagonal and upper triangular part of the input matrix A
contain the matrix U. The lower triangular part of the input matrix
(excluding the diagonal) contains L. The diagonal elements of L are unity,
and are not stored.

So the LU decomposition of A changes the contents of A.
If you wish to check the results, you will have to make a copy of A before
the decomposition.

Hope this helps,
Fleur

> Hi,
> 					-1				     -1
> I computed an inverse of a matrix A  but after the multiplication AA  I didn't get the identity.
>
> Could somebody help me, please.
>
> Thans
>
>
>


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