Write a program to analyze the cooling of a cup of coffee. Start by asking the user to enter a matrix in the format [a, b; c, d]. The matrix win contain two columns; the first is time in minutes and the second is temperature in degrees Celsius. These pairs of values indicate the actual temperatures of the coffee at the specified times. If the matrix entered does not have at least two rows or does not have exactly two columns, warn the user and ask them to enter a matrix in the correct format until they do it correctly. Next ask the user to enter the room temperature [°C].
Create a table of output showing the time in hours and toe temperature above room temperature m degrees Fahrenheit.
Time must be shown to two decimal places; temperature should be shown as an integer.
- The output statement must be written such that the number of entries in toe matrix could change and the table would still be created correctly
Using the data entered, create a graph with an exponential trendline to project the temperature above room temperature at 30 minutes on a graph.
- The axis limits, grid, axis labels, and title must match exactly to the graph shown. The title is shown in bold, red letters, size 20. Time should be in minutes and temperature above room temperature should be degrees Fahrenheit.
- The markers are open red circles, size 16.
- The line is red dashed format, line width 2.
- Background color on the trendline text is green; font sue is 16.
- The background on the graph is white.
Example:
Enter a matrix of form [a, b; c, d] for time [min], temperature [deg C] of a cup of coffee.
[1, 91; 5, 87.5, 8, 84.9];
Enter the temperature of the room [deg C]: 26
Time (t) [h] | Temp above Room (T) [deg F] |
0.02 | 117 |
0.08 | 111 |
0.13 | 106 |
After the table and graph have been produced, use a menu to ask users if they wish to analyze another set of data, and either repeat or terminate the program as appropriate.
Want to see the full answer?
Check out a sample textbook solutionChapter 19 Solutions
THINKING LIKE AN ENGINEER W/ACCESS
- As the potential across the resistor increased, the current through the resistor increased. If the change in current is proportional to the voltage, the data should be in a straight line and it should go through zero. In these two examples how close is the y-intercept to zero? Is there a proportional relationship between voltage and current? If so, write the equation for each run in the form potential = constant x current. (Use a numerical value for the constant.)arrow_forwardBriefly explain each of the following block (one sentence or less)a) G96 S200 M03b) G00G42X20.0Z2.0c) G92 X59.0 Z-50.0 R-2.5 F0.25 d) G72 P10 Q20 U1.0 W0.5 F0.2arrow_forwardPlease include a kinamatic diagram (for velocity) Please DO NOT solve this using velocity analysis (cartesian vector analysis). I would like it to be solved using scalar method. We dont use 3D in this course. We only use scalar analysis for the relative velocity equation as requested in the question (writing the x and y components of the equation and solving the equations for the unknowns). Below I have attached a sample question with solution in order to get an idea on how to use the scalar method to solve my question. I would like question this to be solved in a similar way. Thank you for your understanding. If you can solve it as soon as possible that would be great and I will give you a thumps up and positive feedback :)arrow_forward
- The Pascal triangle can be displayed as elements in a lower-triangular matrix as shown on the right. Write a MATLAB program that creates a n × n matrix that displays n rows of Pascal’s triangle. Use the program to create 4 and 7 rows Pascal’s triangles. (One way to calculate the value of the elements in the lower portion of the matrix isarrow_forwardUSE MATLAB (Convolutional Code) The vector representation of a convolutional code is g1=[1 1]and g2=[1 0]. If the received sequence is 11 11 01 10, please use Viterbi Algorithm todecode it. Please show the full trellis diagram, including the updated trellis statemetrics.arrow_forwardImportant instruction: These questions use the last three-digit value (L3D) of individual student matrix numbers. For example, if the matrix number is CD180264 then the L3D value is 264 (since the last three digits is 264). Some data require multiplication of the L3D value, for example, 10(L3D) means 10 x L3D subject name is INDUSTRIAL ENGINEERINGarrow_forward
- Seawater can be purified by distillation into potable water. If it costs 15 cents per kilowatt-hour for energy, what is the cost of energy to produce 100.0 gallons of drinking water at 100.0 ˚C if the seawater starts at 25.00 ˚C? (1 watt × 1 second = 1 joule). Enter your answer to the nearest penny.arrow_forwardUse your matrix number by adding the last three digits to get the value of X on the velocityof plane A. The value of X will then need to be added with the digit of 150 as follows;Example; If your matrix number is AD190251,Velocity of plane A, VA = 150 + X km/hX = (2 + 5 + 1) = 8Therefore, the velocity of plane A, VA = 150 + X, = 150 + 8 = 158 km/h. SO MY LAST THREE DIGITS ARE: 008arrow_forward1. Circle weather the following statements are true or false. If the statement is true justify your reasoning if the statement is false correct the statement to make it true or justify why it is false a. Impulse is the integral of a force vs distance graph b. In two dimensions analyzing linear and angular momentum provides up to three scalar equations. c. Linear acceleration and angular acceleration both have units of ft/s^2 or m/s^2 d. When absolute motion or a rigid body it is important to find a function that relates linear and angular position then integrate to find velocity e. Instantaneous centers can only be determined for velocity and only for a snapshot in timearrow_forward
- A member of your team gives you the following MATLAB program. Your job is to create the function used in the program. H = 30; % height [cm] V = 50; % volume [cm^3] % calculates the radius [cm] of a cone R2 = RadiusCone(H,V);arrow_forwardHi. I am trying to practice this problem using a checker online, but everytime I recalculate my answer it always says it's incorrect. So far I have calculated and tried to input the following values: 0.0342 m3/s, 0.0358 m3/s, 0.04277 m3/s, and 0.0555 m3/s but it always keeps saying they are incorrect. Please help show me the correct steps on how to get the correct answer as I am trying to learn this process. Thank you!arrow_forwardUSE MATLAB AND SOLVE THIS QUESTION The ideal gas law relates the pressure P, volume V, absolute temperature T, and amount of gas n. The law is P = nRT/ V where R is the gas constant. An engineer must design a large natural gas storage tank to be expandable to maintain the pressure constant at 2.2 atm. In December when the temperature is 4°F (- 15°C), the volume of gas in the tank is 28 500 ft3 . What will the volume of the same quantity of gas be in July when the temperature is 88°F (31°C)? (Hint: Use the fact that n, R, and P are constant in this problem. Note also that K =°C +273.2.)arrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY