Question: Using MATLAB and given the known values and the equation below 1. Create an array of time values ranging from t = 0 sec to

Using MATLAB and given the known values and the equation below

1. Create an array of time values ranging from Using MATLAB and given the known values and the equation below 1. t = 0 sec to Create an array of time values ranging from t = 0 sec t = 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.

2. Calculate an array of temperature values one at a time using a loop. You may not use vectorized techniques to accomplish this.

3. 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, to t = 18,000 sec in steps of 1 sec. Using a x -label, and vectorized operation, calculate an array of coffee temperatures that correspond to the y -label on your plot. Make your line a cyan dotted line, with square data markers.

4. 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. 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.

given times. You may not use loops to accomplish this. 2. Calculate

In this case

Ta = 68 F

To = 180 F

K = 0.0719

Cup of coffee is made at 12:00 pm noon.

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!