Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Change axes of ellipsoid
Date: Fri, 14 May 2010 06:46:37 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <hsirkd$jnb$1@fred.mathworks.com>
References: <hsi8q2$jjo$1@fred.mathworks.com> <hsijku$ltv$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1273819597 20203 172.30.248.37 (14 May 2010 06:46:37 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 14 May 2010 06:46:37 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:635723

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <hsijku$ltv$1@fred.mathworks.com>...
> ........
> q = dot(p,w,2)*w + cosa*cross(wp,w,2) + sina*wp; % Rotate p
> ........

  I thought of one blunder in that code.  In generating q the intent was that each row of w was to be multiplied by the single value in the corresponding element of the single column of dot(p,w,2), but the '*' operation won't do the job there.  It ought to read

q = repmat(dot(p,w,2),1,3).*w + cosa*cross(wp,w,2) + sina*wp;

Roger Stafford