Newton's Law of Cooling My Soluti A cheesecake is taken out of the oven with an ideal internal temperature of 165°F, and is placed into a 35°F refrigerator. After 10 minutes, the cheesecake has cooled to 150°F. If we must wait until the cheesecake has cooled to 70°F before we eat it, how long will we have to wait? Solve the equation via MATLAB making sure that you passed though the following: 1. Initialization of variables 2. Setting up the differential equations 3. Listing down initial conditions 4. Solving for the parameter k. 5. Finding the resulting model 6. Finding the period where the temperature will be 700 F. 7. Graph the solutions

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please use matlab and follow the format of the script. thanks! 

Newton's Law of Cooling
My Solutio
A cheesecake is taken out of the oven with an ideal internal temperature of 165°F, and is placed into a 35°F refrigerator. After 10 minutes, the cheesecake has cooled to 150°F. If
we must wait until the cheesecake has cooled to 70°F before we eat it, how long will we have to wait?
Solve the equation via MATLAB making sure that you passed though the following:
1. Initialization of variables
2. Setting up the differential equations
3. Listing down initial conditions
4. Solving for the parameter k.
5. Finding the resulting model
6. Finding the period where the temperature will be 700 F.
7. Graph the solutions
Transcribed Image Text:Newton's Law of Cooling My Solutio A cheesecake is taken out of the oven with an ideal internal temperature of 165°F, and is placed into a 35°F refrigerator. After 10 minutes, the cheesecake has cooled to 150°F. If we must wait until the cheesecake has cooled to 70°F before we eat it, how long will we have to wait? Solve the equation via MATLAB making sure that you passed though the following: 1. Initialization of variables 2. Setting up the differential equations 3. Listing down initial conditions 4. Solving for the parameter k. 5. Finding the resulting model 6. Finding the period where the temperature will be 700 F. 7. Graph the solutions
2 %Find also the derivative of P(t) and set as dP
3
4
5
6 %Initial Conditions
7
8
9 Ta=
%Ambient Temperature
10 Ufinal =
%Final Temperature
11
12 % Set the differential equation model as eqn1;
13
14
15 %Find k1 and k2, by solving the initial value problem eqn1 using cond1 and cond2, respectively.
16
17
18
19 %Solve for k by equating k1 and k2 at t=0. Save results as k.
20
21
22 %Solve the eqn1 using the acquired value of k and using Initial value cond1.
23
24
25 %Let the Usoln be equal to Ufinal. Solve the equation and save your answer as tfinal
26
27
28
29 % Plot the equation: Use the Title-Cake Temperature, XValue-Time (in Minutes), YValue=Temperature (F)
30
31
32
33 %Use the domain (0, tfinal+5) with 0.2 gaps from each point
34 x=0:0.2:tfinal+20;
35
36
37
38
39
40
41 plot (0,Usoln (0), '*');
42 plot(tfinal,Usoln(tfinal), 'r*');
43 hold off;
Transcribed Image Text:2 %Find also the derivative of P(t) and set as dP 3 4 5 6 %Initial Conditions 7 8 9 Ta= %Ambient Temperature 10 Ufinal = %Final Temperature 11 12 % Set the differential equation model as eqn1; 13 14 15 %Find k1 and k2, by solving the initial value problem eqn1 using cond1 and cond2, respectively. 16 17 18 19 %Solve for k by equating k1 and k2 at t=0. Save results as k. 20 21 22 %Solve the eqn1 using the acquired value of k and using Initial value cond1. 23 24 25 %Let the Usoln be equal to Ufinal. Solve the equation and save your answer as tfinal 26 27 28 29 % Plot the equation: Use the Title-Cake Temperature, XValue-Time (in Minutes), YValue=Temperature (F) 30 31 32 33 %Use the domain (0, tfinal+5) with 0.2 gaps from each point 34 x=0:0.2:tfinal+20; 35 36 37 38 39 40 41 plot (0,Usoln (0), '*'); 42 plot(tfinal,Usoln(tfinal), 'r*'); 43 hold off;
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Algebraic Expression
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education