help-octave
[Top][All Lists]
Advanced

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

Re: inverse matrix c++


From: David Bateman
Subject: Re: inverse matrix c++
Date: Wed, 14 Nov 2007 13:05:05 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

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

>> 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..
>>
>> D.
>>
>>
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)
else
  {
      // Do the rest of your calculation
  }

D.


-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

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