Question: Complete the following problems using MATLAB to solve them. Submit your codes as an m - file or mlx file according to the homework requirements.

Complete the following problems using MATLAB to solve them. Submit your codes as an m-file or mlx file according to the homework requirements. Use logical function "if" and logical operators such as > or >= as appropriate to check if the given parameters in one unit or the other before applying suitable conversion.
1.) Given an angle in degrees or radians, determine the angle in the other units and the quadrant of the angle. Find the values for =905,145, and 17 radians.
2.) Given a distance in feet or miles, calculate the distance in the other unit. Find how many miles are in 11,205ft and how many feet are in 248.6 miles.
3.) Given mass in kilograms or slugs, calculate the other. Convert 82kg into slugs and 1slug into kilograms.
4.) Create a user defined function called g that satisfies the following criteria:
For x-,g(x)=-1
For x- and x,g(x)=cos(x)
For x>,g(x)=-1
Plot your results for values of x from -2 to +2. Choose your spacing to create a smooth curve.
5. Create a program that first prompts the user to enter a value for x and then prompts the user to enter a value for y. If the value of x is greater than the value of y, send a message to the command window telling the user that x>y. If x is less than or equal to y, send a message to the command window telling the user that yx.
 Complete the following problems using MATLAB to solve them. Submit your

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!