Path: news.mathworks.com!not-for-mail
From: "Justin Morehouse" <norman_batez@MSN.com>
Newsgroups: comp.soft-sys.matlab
Subject: Find angles between two vectors
Date: Wed, 23 Jan 2008 13:13:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <fn7egt$447$1@fred.mathworks.com>
Reply-To: "Justin Morehouse" <norman_batez@MSN.com>
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 1201093981 4231 172.30.248.37 (23 Jan 2008 13:13:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 23 Jan 2008 13:13:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1256132
Xref: news.mathworks.com comp.soft-sys.matlab:447182


Hi there, I have a two vectors (3,5) and (5,6) and I was 
wondering how do I get the angle between them in matlab.

on paper I would multiply both vectors to get (15+30) to = 
45 and then square both (3,5) and (5,6) to get (9+25) and 
(25+36). Then I would get the square root of both (34) and 
(61) and multiply them together  and then divide 45 by that.

Afterwhich  I would then use a trusty calc to do cos theta 
of that, but how can math lab do that?

Thanks!