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
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?
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...
9) The temperature id degrees Fahrenheit and the number of emergency calls are shown below. Determine...
9) 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 If X is equal to 80, what is the value of y? A unable to determine because the relationship...
Temperatures in LA. The average daily high temperature in March in Los Angeles is 70 degrees...
Temperatures in LA. The average daily high temperature in March in Los Angeles is 70 degrees Fahrenheit with a standard deviation of 5 degrees Fahrenheit. Suppose that the temperatures in March closely follow a normal distribution. Round calculated answers to 4 decimal places. 1. What is the probability of observing an 75 degrees Fahrenheit temperature or higher in Los Angeles during a randomly chosen day in March? .1586 2. How cold are the coldest 5% of the days during March...
(Do this in C++ please and make sure no compile/run errors): I. Write a function that...
(Do this in C++ please and make sure no compile/run errors): I. 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: 1. The number of temperatures to randomly generate. 2. The name of the output file. A sample run is included below (you must follow the format provided below): Please enter the name of...
JAVA ASSIGNMENT 1. Write program that opens the file and process its contents. Each lines in...
JAVA ASSIGNMENT 1. Write program that opens the file and process its contents. Each lines in the file contains seven numbers,which are the sales number for one week. The numbers are separated by comma.The following line is an example from the file 2541.36,2965.88,1965.32,1845.23,7021.11,9652.74,1469.36. The program should display the following: . The total sales for each week . The average daily sales for each week . The total sales for all of the weeks .The average weekly sales .The week number...
Lab 6    -   Program #2   -   Write one number to a text file. Use the write()...
Lab 6    -   Program #2   -   Write one number to a text file. Use the write() and read() functions with binary                                                        data, where the data is not char type.              (Typecasting is required) Fill in the blanks, then enter the code and run the program. Note:   The data is int type, so typecasting is            required in the write() and read() functions. #include <iostream> #include <fstream> using namespace std; int main() {    const int SIZE = 10;   ...
1. The temperature in degrees Fahrenheit and the number of emergency calls are shown below. Determine...
1. The temperature in 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 value of the Coefficient of Determination (R2)? Select one: a. .5899. b. .6583. c. .8114. d. .2577. 2. The average chocolate chip cookie...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT