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 18:57:05 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 11
Message-ID: <idr8q1$s5q$1@fred.mathworks.com>
References: <idr87f$ho7$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 1291921025 28858 172.30.248.38 (9 Dec 2010 18:57:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 9 Dec 2010 18:57:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:693987

"Martin " <joonyhur@gmail.com> wrote in message <idr87f$ho7$1@fred.mathworks.com>...
> Hi,
> 
> I'm wondering what is the best way to generate uniform random rotation (orthonormal) matrix with a dimension higher than 4 using matlab.
> 
> Thanks.

What about
[Q, ~] = qr(randn(ndim))

Bruno