Code covered by the BSD License  

Highlights from
Find angles

5.0

5.0 | 1 rating Rate this file 6 Downloads (last 30 days) File Size: 3.78 KB File ID: #37389
image thumbnail

Find angles

by

 

Find angles of triangle and/or quadrilateral when vertices are given.

| Watch this File

File Information
Description

     Three functions TRIangles, QUADangles and FIndAngles are given to find the angles of triangle and quadrilateral when vertices are known. TRIangles needs vertices in order 3X2 to calculate its three angles. QUADangles needs vertices in the order 4X2 to calculate its four angles. Vertices are input in anti-clock wise direction. The output is a row vector. When angles of many triangles and quadrilaterals are need to be evaluated, use FindAngles, it will take vertices and depending on the order of vertices gives angles.
      
     The dot product between the vectors is used to calculate the angles.
theta = arc((a.b)/(|a|*|b|))

     After finding the angles, make check of the angles using sum(angles). If vertices are of triangle sum will be 180, sum will be 360 for quadrilateral.
 
     Thanks for Downloading. Don't forget to rate or comment.

MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
03 Jul 2012 Santhana Raj

good work & a simple way to find, rather than the Heron's formula which is both tedious and problematic when the vertices are closer.

good work
Cheers
Santhana Raj

Contact us