Question: Prelab: Understand Function: Convert Fahrenheit Temperature to Celsius - Do it before your lab day 0 solutions submitted ( max: Unlimited ) Two commonly used

Prelab: Understand Function: Convert Fahrenheit Temperature to Celsius -
Do it before your lab day
0 solutions submitted (max: Unlimited)
Two commonly used scales for measuring temperature are Fahrenheit and Celsius. We will often want to convert temperature in degrees Fahrenheit to Create a function called tempF2C that will accept as input a single temperature in degrees Fahrenheit and return the equivalent temperature in degrees
Recall that Fahrenheit and Celsius are related by the following equation:
TC=TF-321.8
Function 8
Save
C Reset
Sofine the function tempF2C to convert degree in Fahrenheit to Celsius.
function tempC = tempF2C(tempF)
susing the formula to do the convertion. The input is tempF, the format parameter defined in the function.
$The calculated result is assigned to the return variable tempC
end
temp C=dots;; do add ; at the end for any statement in a function.
Code to call your function 0
% Test your function
tF=75; & temperature degree in Fahrenheit
tC= tempF2C(tF) scall your function to convert it to Celsius and store the result in tc.
 Prelab: Understand Function: Convert Fahrenheit Temperature to Celsius - Do it

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!