Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: angles in a triangle
Date: Fri, 16 Mar 2012 20:22:18 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <jk07dq$api$1@newscl01ah.mathworks.com>
References: <jjvsf5$1ht$1@newscl01ah.mathworks.com> <jjvuh5$90o$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1331929338 11058 172.30.248.35 (16 Mar 2012 20:22:18 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 16 Mar 2012 20:22:18 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:761256

"Gregory" wrote in message <jjvuh5$90o$1@newscl01ah.mathworks.com>...
> "Gregory" wrote in message <jjvsf5$1ht$1@newscl01ah.mathworks.com>...
> > ......
> >      1     5
> >      1     2
> >      2     4
> > 
> > and the angles i got (in degrees) ans =
> > 
> >    45.0000   26.5651  108.4349.
> > 
> > but when i plotted the graph, none of the angles were > 90 degrees.
> .......
> A1 = atan2(abs(det([V2-V1;V3-V1])),dot(V2-V1,V3-V1))/pi*180;
> A2 = atan2(abs(det([V3-V2;V1-V2])),dot(V3-V2,V1-V2))/pi*180;
> A3 = atan2(abs(det([V1-V3;V2-V3])),dot(V1-V3,V2-V3))/pi*180;
- - - - - - - - - -
  You've got the right formula and moreover your angles are correct.  It's your plotting that is at fault.  That third angle is actually an obtuse, not acute, angle.  It is greater than ninety degrees.  It has to be so that the three angles can sum to 180 degrees.  Try plotting it again very carefully on a larger graph.

Roger Stafford