[Top][All Lists]

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

Re: inverse matrix c++

From: Javier Rodríguez Benito
Subject: Re: inverse matrix c++
Date: Wed, 14 Nov 2007 16:17:36 +0100
User-agent: Thunderbird (Windows/20070728)

David Bateman escribió:
Javier Rodríguez Benito wrote:
I´m using octave 2.9.16, I tried before with 2.0.54 and I had the same
The matrix is a covariance matrix so it is positive semidefined.


Javier Rodríguez Benito wrote:
Yes, I´m doing that way
 Matrix Y = X.inverse();
The problem is that if I try this with a matrix of 10x10 it works
fine, but when I do this for a bigger one (186x186, in my case) this
doesn't work
Which version of Octave? What is the matrix? Is it positive definite for
example? Can you save the matrix and sent so I can test it..


Your condition number is 5.5043e+21, and the matrix is singular to the
machine precision, so perhaps you want to write

octave_idx_type info;
double rcond;
Matrix Y = X.inverse (info, rcond);

if (info != 0)
   error ("Matrix singular to machine precision with a reciprocal
condition number of %e", rcond)
      // Do the rest of your calculation


I tried this solution but it doesn´t work either. I get the error sentence, I´m not sure if it is because I don´t have some libraries for sparse matrices installed

Attachment: javierb.vcf
Description: Vcard

reply via email to

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