Question: In Matlab: Problem 2 (5 points) The figure below shows a cross-section of a double-pane window with argon gas between the glass. Figure 2 In

In Matlab:

Problem 2 (5 points)

The figure below shows a cross-section of a double-pane window with argon gas between the glass.

Figure 2

In this figure, note that In Matlab: Problem 2 (5 points) The figure below shows a cross-sectionTA,O is the outdoor ambient temperature, In Matlab: Problem 2 (5 points) The figure belowTA,I is the indoor ambient temperature, In Matlab: Problem 2 (5 points) The figure belowT1 is the temperature at the outer side of the exterior glass, In Matlab: Problem 2 (5 points) The figure belowT2 is the temperature on the inner side of the exterior glass, In Matlab: Problem 2 (5 points) The figure belowT3 is the temperature of the inner side of the interior glass, In Matlab: Problem 2 (5 points) The figure belowT4 is the temperature of the outer side of the interior glass, In Matlab: Problem 2 (5 points) The figure belowxgl is the width of the glass, and In Matlab: Problem 2 (5 points) The figure belowxarg is the width of the argon gas gap between the two glasses.

Given a particular window's dimensions and given indoor and outdoor temperatures, it is possible to generate a simultaneous system of linear equations for the temperatures as

In Matlab: Problem 2 (5 points) The figure below{245 T1+200 T2+1800=0200 T1201.6 T2+1.6 T3=01.6 T2201.6 T3+200 T4=0200 T3212 T4+276=0 (5)

where each temperature is expressed in degrees Celsius (C).

Analytically (i.e. with paper and pencil), put this system into the matrix form In Matlab: Problem 2 (5 points) The figure belowAx=b, and use that result to enter the variables A and binto your program; you do not need to turn in your analytical work for determining what A and b are.

Once you have determined what A and b are, solve this system using MATLAB's row reduced echelon form solver. Using a loop to automate the process, print the values of the temperatures to the Command Window with labels and units.

Problem 3 (11 points)

An active area of research is forensic entomology, i.e. the application and study of insect and other arthropod biology to crime scene investigations. The presence, growth, and development of insects and arthropods can be used to date crime scenes. An important consideration in this field is the temperature of a body, since temperature is a driving factor in the developmental cycles of most insects and arthropods. Techniques such as Newton's Law of Cooling can be used as a first order approximation of the object's temperature. Let's examine how Newton's Law of Cooling works using a cup of coffee as a convenient object of study.

Assuming a constant ambient temperature (i.e. the temperature of the environment), Newton's Law of Cooling is given as

In Matlab: Problem 2 (5 points) The figure belowdT0dt=K(TAT0) (6)

where In Matlab: Problem 2 (5 points) The figure belowTA is the ambient temperature, In Matlab: Problem 2 (5 points) The figure belowT0 is the initial temperature of the object of interest, In Matlab: Problem 2 (5 points) The figure belowK is a proportionality constant, and In Matlab: Problem 2 (5 points) The figure belowtrepresents time. Eqtn. 6 is a separable differential equation. Solving Eqtn. 6 using the basic techniques of calculus yields

In Matlab: Problem 2 (5 points) The figure belowT(t)=TA+(T0TA)eKt (7)

where In Matlab: Problem 2 (5 points) The figure belowT(t) is the temperature of the object of interest at time In Matlab: Problem 2 (5 points) The figure belowt.

Consider the following:

A cup of coffee is made at exactly 12:00 p.m. (noon).

The temperature of the room the coffee cup is in is 68.0 F.

After two minutes, the coffee has cooled from an initial temperature of 180 F to a temperature of 165 F.

For this problem, complete the following:

Calculate the proportionality constant In Matlab: Problem 2 (5 points) The figure belowK by hand. There is no need to turn in your written work for this; instead, you will use this information for the rest of the problem. Strictly speaking, it does not matter what unit set you use for In Matlab: Problem 2 (5 points) The figure belowK, but as a practical matter for the other parts of this problem you may find it advantageous to calculate In Matlab: Problem 2 (5 points) The figure belowK in terms of sec-1.

Using the calculated proportionality constant:

Create an array of time values ranging from In Matlab: Problem 2 (5 points) The figure belowt = 0 sec to In Matlab: Problem 2 (5 points) The figure belowt = 18,000 sec in steps of 1 sec. Using a vectorized operation, calculate an array of coffee temperatures that correspond to the given times. You may not use loops to accomplish this.

Calculate an array of temperature values one at a time using a loop. You may not use vectorized techniques to accomplish this. Note that you should get the same result for both approaches (1) and (2); if not, a mistake was made in one (or both) approaches. Use this information to check your work.

Using either your results from Part 2(1) or Part 2(2), plot the temperature history vs. time. (If you completed Part 2 correctly, the results should be identical anyway.) Be sure to include a title, In Matlab: Problem 2 (5 points) The figure belowx-label, and In Matlab: Problem 2 (5 points) The figure belowy-label on your plot. Make your line a cyan dotted line, with square data markers.

Experiment with the time step size, allowing the time step to become larger and smaller. Calculate the wall time (i.e. the "real time") for runs of both the vectorized and loop-based approaches as you vary the time step size. Is one approach faster than the other? Does it depend on how big the data set is? Leave code for at least three numerical experiments in the project file you submit for a grade, but feel free to explore more scenarios than this. Print your responses to these questions to a data file located on the desktop of the machine you are using; be sure to close that file when you are done. (When we grade your code, we will check to make sure this process would work for you on your machine, even if the file system on your machine does not match the file system on our own machines.) When you consider your responses, please remember that MATLAB's loop performance has improved over the years, so be sure to report what you actually observe; offer your reasoned explanation for why you are seeing what you are seeing.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!