Question: (a) Write a function named rightTriangle.m that allows the user to input 2 sides of a right triangle and delivers the following information back to

 (a) Write a function named rightTriangle.m that allows the user toinput 2 sides of a right triangle and delivers the following information

(a) Write a function named rightTriangle.m that allows the user to input 2 sides of a right triangle and delivers the following information back to the user: i. the value of the hypotenuse ii. both interior angles, 01 (angle opposite side) and 02 (angle opposite side2). Recall, S1 sin(01) h 01 sin-6) You can use asin(si/h) and asin(s2/h) to find 01 and 62, respectively. iii. cos 01, cos 62, sin 01, sin 02, tan 01, tan 02 An example of usage is as follows: >> rightTriangle (sqrt(3),1) hypotenuse = 2.00 thetal is the angle between 1.00 and 2 theta2 is the angle between 1.73 and 2 thetal = 1.05 radians sin(theta1) = 0.87 cos (theta1) = 0.50 tan(theta1) = 1.73 theta2 = 0.52 radians sin(theta2) = 0.50 cos (theta2) = 0.87 tan(theta2) = 0.58 Be sure to include a 'help' block that gives the user usage instructions. In the command window enter help rightTriangle to view the usage information, then run your function from the command window using the following values: i. sidel = 3, side2 = 4 ii. sidel = 38, side2 = 93 iii. sidel = 5, side2 = 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!