[Fwd: RE: Possible Bug -> QR Decomposition]


Sender: Cleve Moler <Cleve.Moler@mathworks.com>
Subject: RE: Possible Bug -> QR Decomposition


There is no bug.  Both results are correct.  The QR decomposition is not unique.
  -- Cleve Moler

-----Original Message-----
From: jama@nist.gov [mailto:jama@nist.gov] On Behalf Of Lachlan Grogan
Sent: Monday, November 10, 2008 8:23 PM
To: Multiple recipients of list
Subject: Possible Bug -> QR Decomposition

Hi All,

I'm using a port of 1.02 code.

I have a matrix 3x3 where
V =
  100    10     1
  625    25     1
  900    30     1

I wish to get the QR of the matrix.

Jama returns:
Q =
-0.0908856214131766     0.878886544558686     -0.468292905790847
-0.568035133832354       0.340488733969466      0.749268649265355
-0.817970592718589      -0.334104570207539     -0.468292905790847


MatLab returns:
>> [Q,R] = qr(V,0)
Q =
  -0.0909    0.8789    0.4683
  -0.5680    0.3405   -0.7493
  -0.8180   -0.3341    0.4683
R =
 1.0e+003 *
  -1.1003   -0.0396   -0.0015
        0        0.0073    0.0009
        0         0            0.0002

The right hand column of the Q matrix contains negative values, where
the MatLab version returns positive values.

Any suggestions on what to look for to track down this bug.

Thanks
Lachlan Grogan













Date Index | Thread Index | Problems or questions? Contact list-master@nist.gov