Question: Write a MATLAB program that asks the user to enter the length of the opposite and adjacent sides of a right triangle with respect to

Write a MATLAB program that asks the user to enter the length of the opposite and adjacent sides of a right triangle with respect to an angle, theta. After the user has entered all three values, a menu should pop up asking if the user wants to calculate sin(theta), cos(theta), tan(theta), cot(theta), cosec(theta), or sec(theta). The program should display a final message, such For a triangle of sides H, O and A, sin(theta) = 0.3 where H, O and A are replaced by the actual lengths entered by the user. The value of the hypotenuse must be calculated based on the lengths of the opposite and adjacent sides entered by the user. For your information, cot(theta) = 1/tan(theta), cosec(theta) = 1/sin(theta) and sec(theta) = 1/cos(theta)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
