Question: Write a MATLAB function called Temperature which (1) takes two integer inputs of temperature an hour ago and temperature now in degrees Fahrenheit, (2) prints

Write a MATLAB function called Temperature which (1) takes two integer inputs of temperature an hour ago and temperature now in degrees Fahrenheit, (2) prints the temperatures in degrees Celsius, and (3) returns the temperature difference:

                                                                                                    

Keep in mind: 

C = 5/9 ∗ (F − 32)

 

ΔT = Tfinal – Tinitial

 

  1. The inputs should be imputed from the main. 
  2. You should print the height and weight in m and kg.
  3. Return the body mass index and print it in the main function on a separate line. 

Sample output – User input indicated in bold

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

here is the MATLAB function called Temperature Code snippet function tempDifference Temperaturetemp1 temp2 Conversion to Celsius temp1C 59 temp1 32 temp2C 59 temp2 32 Print temperatures in Celsius fpr... 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

Students Have Also Explored These Related Programming Questions!