Question: Write a program to calculate a temperature provided by the user into a different unit system. The program should ask the user to enter a

Write a program to calculate a temperature provided by the user into a different unit system. The program should ask the user to enter a temperature unit of degrees Fahrenheit. The program should then ask the user to choose a unit system they would like to have the value converted into, using a menu. The menu should display the choices " deg, C, k and deg R, which should be a stored in cell array. The program should display the output in a sentence formatted as shown below. The actual values in the sentence should change appropriately as the user input and menu selection changes.

M Choose a final unit deg C K deg R X Enter the temperature (Deg F) : -128 Menu Chose : k

The Equivalent temperature to -129 Deg F is 184 K.

You are to write this program twice, using two different method as indicated below. Note that in neither case may you use conditional statement, even it you know ho to do so.

a. The program should first convert the temperature in degrees Fahrenheit to all three other unit systems ( degrees Celsius, kelvin, degrees Rankine) and store the result in a vector. it should then generate the report.

b. The program should perform ONLY the specified calculation, not all three, then generate the report. Hint: Store the necessary conversion factors in matrix.

M Choose a final unit deg C K deg R X

Step by Step Solution

3.42 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem we will write two different MATLAB programs for converting temperature from Fa... View full answer

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

Document Format (2 attachments)

PDF file Icon

60961da9089d9_26620.pdf

180 KBs PDF File

Word file Icon

60961da9089d9_26620.docx

120 KBs Word File

Students Have Also Explored These Related Programming Questions!