Question: MATLAB Write a script that asks a user for the length of two sides of a triangle and the angle between them to calculate the

MATLAB Write a script that asks a user for the length of two sides of a triangle and the angle between them to calculate the area. A message should be displayed presenting the calculation results. The user must also specify if the angle entered is in radians(r) or degrees(d) so that the appropriate calculation can be executed. If the user enters an incorrect choice, an error message should be shown. Specifications: You must create 2 functions: areadeg, which applies if the user chooses degrees, and arearad, when the user chooses radians. The functions must receive the necessary data from the script, and must return the result of the area calculation to the script. The script is your main program. The input data request must be coded in the script. The conditional statement to evaluate the user choice of radians or degrees must also be coded in the script. The area functions must be called (executed) from the script according to the user choice. The result must be displayed from the script. You must use fprintf() to display the triangular area result, formatted to 2 decimal places.

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!