I guess you get the result from applying directly DGETRI on A ...
Well no, this does not work like this, to compute the inverse of A with
DGETRI, you first need to call DGETRF then DGETRI as explained in the
header of the routine:
* DGETRI computes the inverse of a matrix using the LU factorization
* computed by DGETRF.
Your code should not be muche more harder. Just insert a call to DGETRF
before the call to DGETRI and it should a priori work.
Julien.
For the LAPACKers, try:
A = [ 1 0.5 0.25 ; 0.5 1 0.5 ; 0.25 0.5 1];
U=triu(A); L=tril(A,-1)+eye(3); inv(L*U)
:)
On Thu, 2 Aug 2007, sabhnani@Domain.Removed wrote:
Hi,
I downloaded clapack and trying to use dgetri and dpptri functions but am
getting wrong results for inverse of matrices.
Particularly,
[ 1 0.5 0.25 ] [ 1.25 -0.5 0.0 ]
[ 0.5 1 0.5 ] =====> [ -0.5 1.25 -0.5 ]
[ 0.25 0.5 1 ] [ 0.0 -0.5 1.25 ]
Do you know what might be the problem?
Thanks in advance for your time.
Robin
_______________________________________________
Lapack mailing list
Lapack@Domain.Removed
?> http://lists.cs.utk.edu/listinfo/lapack
?
?
|