Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Uniform random rotation matrix
Date: Thu, 9 Dec 2010 22:10:22 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 8
Message-ID: <idrk4e$t80$1@fred.mathworks.com>
References: <idr87f$ho7$1@fred.mathworks.com> <idr8mi$q71$1@fred.mathworks.com> <idrfee$3iu$1@fred.mathworks.com> <idrg69$hrj$1@fred.mathworks.com> <idrgpg$so6$1@fred.mathworks.com> <idri4m$nuc$1@fred.mathworks.com> <idriop$5q2$1@fred.mathworks.com> <idrj41$buh$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1291932622 29952 172.30.248.38 (9 Dec 2010 22:10:22 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 9 Dec 2010 22:10:22 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:694046

Just wonder John, does the QR of your Matlab always output diag(R)>=0 ?

If not, a change should perhaps is nevessary:

[Q, R] = qr(randn(ndim))
Q = Q*diag(sign(diag(R)))

Bruno