Question

Write an M-File scripts that converts temperature in degrees Fahrenheit ( °F) to degrees Centigrade (...

Write an M-File scripts that converts temperature in degrees Fahrenheit (
°F) to

degrees Centigrade (

°C) by recall the conversion function in (a).
Use input and disp commands to display a mix of text and number.

Homework Answers

Answer #1
The input program would be:
%Program to convert from F to C
%Take the input from user
ftemp = input('Enter your values in Degree Fahrenheit: ');
%Convert the values from F to C using the conversion factor
%C  =  (F – 32) * 5/9
ctemp = (ftemp-32)*5/9; 
%In the above statement you can also use (ftemp-32)*(5/9) or many other
%combinations to avoid any problems with operator precedence.
fprintf('%f F = %f C\n',ftemp,ctemp);

The result display of the program would be like:

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Program must be in JAVA. Write a program that converts temperature from Celsius to Fahrenheit or...
Program must be in JAVA. Write a program that converts temperature from Celsius to Fahrenheit or vice versa, depending on user's input. The formula for converting temperature in Celsius to Fahrenheit is, Fahrenheit = (9/5) * Celsius + 32 The formula for converting temperature in Fahrenheit to Celsius is, Celsius = (5/9) * (Fahrenheit – 32) Results should be rounded to two decimal points, e.g., 92.56
Write a Matlab function convert T such that convert T(x, ’C’) converts from degrees Celsius to...
Write a Matlab function convert T such that convert T(x, ’C’) converts from degrees Celsius to degrees Fahrenheit, while convert T(x, ’F’) converts from Fahrenheit to Celsius. Need to submit program online to see if successful. Please help! function T = convert_T (x, flag) %convert between Celsius and Fahrenheit temperatures %for example, convert_T(10, 'C') should return 50 %and convert_T(50, 'F') should return 10
Write a java program that asks for temperature in Fahrenheit. The program should accept any floating...
Write a java program that asks for temperature in Fahrenheit. The program should accept any floating point number. Display whether water is liquid, solid, or gas at that temperature at sea level. Display the results like this: “Water at that temperature is a solid/liquid/gas.” (Note: display only the correct state for that temperature.) water freezes at 32 degrees F and boils at 212 degrees F.
Use Python: the formula for converting a temperature from Fahrenheit to Celcius is C=5/9(f-32) where F...
Use Python: the formula for converting a temperature from Fahrenheit to Celcius is C=5/9(f-32) where F is the Fahrenheit temperatre and C is the celcius temperature. Write a function named celcius that accepts a Fahrenheit temperature as an argument. the function should return the temperature, convertedm to celcius. Demonstrate the function by calling it in a loop that displays a table of the fahrenheit temperatures 0 through 20 and their Celsius equivalents.
Water freezes at 0 degrees Celsius, which is the same as 32 degrees Fahrenheit. Also water...
Water freezes at 0 degrees Celsius, which is the same as 32 degrees Fahrenheit. Also water boils at 100 degrees Celsius, which is the same as 212 degrees Fahrenheit. (Use fractions in your answers.) (a) Use the freezing and boiling points of water to find a formula expressing Celsius temperature C as a linear function of the Fahrenheit temperature F. (b)This means that for every one degree increase in the Fahrenheit temperature, the Celsius temperature will increase by what degree?
C++ Fahrenheit to Celsius Tables Write a program that first asks the user which Temperature scale...
C++ Fahrenheit to Celsius Tables Write a program that first asks the user which Temperature scale conversion he/she would like to perform: 1. Convert F to C 2. Convert C to F 3. Quit What is your choice? Then it asks the user for input for three real number variables: start_temp, end_temp, temp_incr. It will then produce a two column Fahrenheit to Celsius table or a two column Celsius to Fahrenheit table, depending on the choice. For choice 1, the...
In c++ format please Most people know that the average human body temperature is 98.6 Fahrenheit...
In c++ format please Most people know that the average human body temperature is 98.6 Fahrenheit (F). However, body temperatures can reach extreme levels, at which point the person will likely become unconscious (or worse). Those extremes are below 86 F and above 106 F. Write a program that asks the user for a body temperature in Fahrenheit (decimals are ok). Check if that temperature is in the danger zone (for unconsciousness) or not and produce the relevant output shown...
Objective: Write a Java program that will use a JComboBox from which the user will select...
Objective: Write a Java program that will use a JComboBox from which the user will select to convert a temperature from either Celsius to Fahrenheit, or Fahrenheit to Celsius. The user will enter a temperature in a text field from which the conversion calculation will be made. The converted temperature will be displayed in an uneditable text field with an appropriate label. Specifications Structure your file name and class name on the following pattern: The first three letters of your...
Download the attached .java file. Run it, become familiar with its processes. Your task is to...
Download the attached .java file. Run it, become familiar with its processes. Your task is to turn TemperatureConversion into GUI based program. it should, at the least, perform similar functions as their text output versions. The key factor to remember is that the workings should remain the same (some tweaks may be necessary) between text and GUI programs, while the means pf visual presentation and user interaction changes. You must properly document, comment, indent, space, and structure both programs. import...
8) The temperature id degrees Fahrenheit and the number of emergency calls are shown below. Determine...
8) The temperature id degrees Fahrenheit and the number of emergency calls are shown below. Determine if there is a relationship between the temperature and the number of emergency calls received. Use .05 significance. number of calls (y) Temperature (x) 7 - 68 4 - 74 8 - 82 10 - 88 11 - 93 9 - 99 13 - 101 What is the linear equation? A. y=7.5441 + 0.1898x B y= 7.5441 - 0.1898x C y= 7.5441 + 0.1898x...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT