Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Matlab - transformation matrix - what is wrong?
Date: Mon, 28 Nov 2011 06:59:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <javbft$81v$1@newscl01ah.mathworks.com>
References: <ja3d4u$o8j$1@dont-email.me> <ja3hvg$2to$1@newscl01ah.mathworks.com> <ja55if$3uf$1@dont-email.me> <ja64e7$m7e$1@newscl01ah.mathworks.com> <jaivg8$ogp$1@dont-email.me> <jaj6jg$p6e$1@newscl01ah.mathworks.com> <jalg4b$d3v$1@dont-email.me> <javaac$4sq$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1322463549 8255 172.30.248.37 (28 Nov 2011 06:59:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 28 Nov 2011 06:59:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:750645

"Roger Stafford" wrote in message <javaac$4sq$1@newscl01ah.mathworks.com>...
>  t = atan2(wx*(R(3,2)-R(2,3))+wy*(R(1,3)-R(3,1))+wz*(R(2,1)-R(1,2)),(trace(R)-1)/2);
- - - - - - - -
  I see I made an error in the expression for the angle, t.  It should be:

 t = atan2(wx*(R(3,2)-R(2,3))+wy*(R(1,3)-R(3,1))+wz*(R(2,1)-R(1,2)),trace(R)-1);

That is, there should be no division by 2 in the second argument.

Roger Stafford