Question: QUESTLON 3 3 . 2 1 Chapter 3 Question 2 1 from MATLAB for Engineers ( Ffith edition ) by Holly Moore - with modifications

QUESTLON 3
3.21 Chapter 3 Question 21 from MATLAB for Engineers (Ffith edition) by Holly Moore - with modifications
Suppose you are designing a container to ship sensitive medical materials between hospitals. The container needs to keep the contents within a specified temperature range. You have created a model predicting how the container responds to the exterior temperature, and you now need to run a simulation.
a. Create a vector of times from 0 to 120 minutes in increments of 30 seconds (0.5 minutes).
Then use randn to generate a vector of random, normally distributed values to represent temperature. Use length to ensure that the temperature vector is the same length as the times vector.
We want the temperatures to have a mean of 70 degrees F and a standard deviation of 2 degrees. To get this, multiply your temperatures vector by 2 and add 70.
b. Plot the data with time on the x axis and temperature on the y axis. Title and label your plot.
c. Find the maximum temperature, the minimum temperature, and the times at which they occur. This will require you to get the position (or index) of the max and min using code like this:
[max temp, index]= max (temperatures) i
And then use the index value to find the corresponding value in the times vector, Display your output,
Your output should look similar to the followingt
Max temp of 74,85 at time 69,5
Min temp of 65,01 at time 48,5 I
 QUESTLON 3 3.21 Chapter 3 Question 21 from MATLAB for Engineers

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!