Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Basic MATLAB Programming Problem. I am new to the MATLAB language so please use write in basic code. Please include step by step comments, explaining
Basic MATLAB Programming Problem. I am new to the MATLAB language so please use write in basic code. Please include step by step comments, explaining all processes and functions. Thank you in advance.
1. Temperature Converter (33 points) Write a function that displays a menu that allows the user to do the following (11): 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 agai If the user chose 3, quit the program. A sample run is included below: RESTART Fahrenheit to Celsius Celsius to Fahrenheit 3. Quit Please select one of the above Please enter a Fahrenheit temperature: 212 212.00 Fahrenheit degrees i 100.00 Celsius degrees Fahrenheit to Celsius Celsius to Fahrenhe 3. Quit Please select one of the above Please enter a Celsius temperature 0.00 Celsius degrees is 2.00 Fahrenheit degrees. Fahrenheit to Celsius Celsius to Fahrenheit 3. Quit Please select one of the above Please enter a valid choice Fahrenheit to Celsius Celsius to Fahrenheit 3. Quit Please select one of the above 2. Writing a Random Temperature File (33 points) Write a function that writes a series of random Fahrenheit temperatures and their correspond. ing Celsius temperatures to a tab-delimited file. Use 32 to 212 as your temperature range. From the user, obtain the following: The number of temperatures to randomly generate. The name of the output file. A sample run is included below (you must follow the format provided below) Please enter the name of your f Example txt Please enter the number of iterations: 100 Example txt Fahrenheit Celsius 152.00 66.67 97.00 36.11 32.000.00 99.00 37.22 35.00 1.67 etc 3. Reading a Random Temperature File (34 points) Write a function that reads a file produced by Problem 2. Focusing only on the Celsius temperatures in the file, calculate and display to screen the following: Mean or Average Minimum MaximumStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started