From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Angle between two Vectors
Date: Wed, 7 Nov 2012 20:07:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <k7ef1c$f4v$>
References: <k7dnsn$c0o$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1352318829 15519 (7 Nov 2012 20:07:09 GMT)
NNTP-Posting-Date: Wed, 7 Nov 2012 20:07:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:782266

"Marcelo Costa" wrote in message <k7dnsn$c0o$>...
> I have a Cartesian (X, Y, Z) with 3 points ABC, and they intersect at point B, would like to know how do I calculate the angle of intersection of these vectors? Sorry for my English. =]
- - - - - - - - - -
  Let A, B, and C each be a three-element vector containing the Cartesian coordinates for the three points.  The interior angle at B of triangle ABC is given by:

 a = atan2(norm(cross(A-B,C-B)),dot(A-B,C-B));

It will be an angle in radians somewhere between 0 and pi.

Roger Stafford