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
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.
Script
6 %Initial Conditions.
1 %Setup the variables U(t) as the function of Temperature over a period of time t, and k that will be used in the program.
2 %Find also the derivative of U(t) and set as du
8
9 Ta=
19 Ufinal =
%Ambient Temperature
%Final Temperature
12 %Set the differential equation model as eqn1;
13
14
15 %Find k1 and k2, by solving the initial value problem eqnl using cond1 and cond2, respectively.
16
17
19 % Solve for k by equating k1 and k2 at t=0. Save results as k.
29
21
22 %Solve the eqn1 using the acquired value of k and using Initial value cond1.
25 %Let the Usoln be equal to Ufinal. Solve the equation and save your answer as tfinal
31
Save C Reset
29% Plot the equation: Use the Title=Cake Temperature, XValue-Time (in Minutes), Yvalue=Temperature (F)
33 %Use the domain (0, tfinal+5) with 0.2 gaps from each point
34 x=0:0.2:tfinal+20;
35
37 plot (0, Usoln (0), '*');
38 plot (tfinal, Usoln(tfinal), 'r*');
39 hold off;
40
MATLAB Documentation
Transcribed Image Text: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. Script 6 %Initial Conditions. 1 %Setup the variables U(t) as the function of Temperature over a period of time t, and k that will be used in the program. 2 %Find also the derivative of U(t) and set as du 8 9 Ta= 19 Ufinal = %Ambient Temperature %Final Temperature 12 %Set the differential equation model as eqn1; 13 14 15 %Find k1 and k2, by solving the initial value problem eqnl using cond1 and cond2, respectively. 16 17 19 % Solve for k by equating k1 and k2 at t=0. Save results as k. 29 21 22 %Solve the eqn1 using the acquired value of k and using Initial value cond1. 25 %Let the Usoln be equal to Ufinal. Solve the equation and save your answer as tfinal 31 Save C Reset 29% Plot the equation: Use the Title=Cake Temperature, XValue-Time (in Minutes), Yvalue=Temperature (F) 33 %Use the domain (0, tfinal+5) with 0.2 gaps from each point 34 x=0:0.2:tfinal+20; 35 37 plot (0, Usoln (0), '*'); 38 plot (tfinal, Usoln(tfinal), 'r*'); 39 hold off; 40 MATLAB Documentation
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Concept of Light
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