Question: MATLAB Problem 1 Write a user-defined function called invtrig() that requires three input arguments: inverse trigonometric function type as a string (valid values: 'arcsin', 'arccos',
MATLAB
Problem 1 Write a user-defined function called invtrig() that requires three input arguments: inverse trigonometric function type as a string (valid values: 'arcsin', 'arccos', or 'arctan'), trigonometric ratio as a single-element numeric array (you must check that the ratio input is between - 1 and 1 if 'arcsin' or 'arccos' is selected; if the ratio input is invalid, ask for a new ratio), and output units as a string (valid values: 'rad' or 'deg'). When called, invtrig() must compute and return the output of the chosen inverse trigonometric function evaluated at the trigonometric ratio supplied. The output value must be in the user's specified units. Write a script file called "Your Name_HW4_Problem 1.m that illustrates how the invtrig() function works. Don't forget to have your script file include a menu for user input options and explanatory text for any results
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
