Question: In this lab, we will use MATLAB to implement Lab 1. You are encouraged to use existing MATLAB functions, such as min,max,and mean whenever needed.
In this lab, we will use MATLAB to implement Lab 1. You are encouraged to use existing MATLAB functions, such as min,max,and mean whenever needed. We highly recommend placing each MATLAB significant function in its own file. For example, the Celsius to Fahrenheit and vice-versa functions should be in their own files so as to be called by other parts of the assignment later on.
Need help with my lab... must be in MATLAB


1. Temperature Converter (33 points) Write a function that displays a menu that allows the user to do the following: (1): Convert a temperature from Celsius to Fahrenheit using the formula F C +32. (2): Convert a temperature from Fahrenheit to Celsius using the formula C (F-32) (3): Quit the program Read the choice from the user. If the user chose 1 or 2, first call a subroutine to get a temperature from the user. Then, pass the temperature as a parameter to the appropriate function and return the converted temperature. Output the returned converted temperature, and then display the menu once again. If the user chose 3, quit the program. A sample run is included below: 1. Fahrenheit to Celsius 2 Celsius to Fahrenheit 3. Quit Please select one of the above: 1 Please enter a Fahrenheit temperature: 212 212.00 Fahrenheit degrees is 100.00 Celsius degrees 1. Fahrenheit to Celsius 2. Celsius to Fahrenheit 3. Quit Please select one of the above: 2 Please enter a Celsius temperature: 0 0.00 Celsius degrees is 32.00 Fahrenheit degrees 1 Fahrenheit to Celsius 2. Celsius to Fahrenheit 3. Quit Please select one of the above 4 Please enter a valid choice 1. Fahrenheit to Celsius 2. Celsius to Fahrenheit 3. Quit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
