Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: angles in a triangle
Date: Fri, 16 Mar 2012 17:15:17 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <jjvsf5$1ht$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1331918117 1597 172.30.248.46 (16 Mar 2012 17:15:17 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 16 Mar 2012 17:15:17 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3384503
Xref: news.mathworks.com comp.soft-sys.matlab:761236

Hi,

I'm currently trying to write an algo to find the angles of a triangle.

I've tried both the acos method and the atan2 method Roger Stafford suggested in a thread before, but the one of the angles always turn out to be pi - theta and not the theta im looking for.

my vertices are 
a =

     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.

is there a way around this?

Thanks!
John