Unformatted text preview: % not degrees, so remember to convert if necessary. % % Hint: a. There is actually a very simple formula to calculate the area % of a triangle when you know two sides and the angle between % them. Remember, Google is your friend. % b. Use the Law of Cosines to find the length of the third side % Knowns side1 = 14; side2 = 29; angleDeg = 42; angleRad = 42 ./ 180 .* pi; % conversion of angle into radians % calcualte area area = (1./2) .* side1 .* side2 .* sin(angleRad); % calculate side3 using law of cosines % c^2 = a^2 + b^2 - 2absin(angle) side3 = sqrt( side1.^2 + side2.^2 - 2.*side1.*side2.*cos(angleRad) ); % calculate perimeter by adding up sides perim = side1 + side2 + side3;...
View Full Document
This note was uploaded on 10/22/2009 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Tech.
- Fall '08