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

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

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!