Path: news.mathworks.com!not-for-mail
From: "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Angle between two vectors
Date: Tue, 11 Dec 2007 19:32:07 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 17
Message-ID: <fjmojn$m1u$1@fred.mathworks.com>
References: <ef5ce9c.-1@webcrossing.raydaftYaTP> <fjj9nj$fia$1@fred.mathworks.com> <fjk0tg$jli$1@fred.mathworks.com> <fjlrpl$gii$1@fred.mathworks.com> <fjm4u4$i8o$1@fred.mathworks.com> <fjmabs$9fh$1@fred.mathworks.com>
Reply-To: "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1197401527 22590 172.30.248.37 (11 Dec 2007 19:32:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 11 Dec 2007 19:32:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:442047


"salih tuna" <salihtuna@gmail.com> wrote in message <fjmabs$9fh
$1@fred.mathworks.com>...
> Roger hi,
> thanks a lot for your help but i am afraid something is
> still missing. i tried the formulae on the same example of 
> a = [1 1]and b = [0 -1] (both passing through origin).
> the answer i got is 315 instead of 225.
> sorry i am taking a lot of your time :)
> thanks
> salih
-----
Hi Salih.  I get 225 degrees for that example with a = [1,1] and b = [0,-1],  
which is correct.  Are you sure you didn't have x2 and y1 interchanged by 
mistake?  That would get you an erroneous answer of 315.  You should have x1 
= 1, y1 = 1, x2 = 0, and y2 = -1.

Roger Stafford