Problem 1
A square metal plate is heated to 75C at one corner, denoted by a red dot in the picture below.
Temperatures are read from locations denoted by the blue dots.
The mathematical model for the temperature distribution in the plate is
T= Ta + Ae-B(x-1)2 e-c(y-1)2
where x & y are locations on the plate, Ta is the ambient temperature of the room, and A,B and C are undetermined coefficients.
The plate dimensions are 1 x 1 . Location (0,0) is at the bottom left0hand corner. The temperature source is at location (1,1) and is fixed at 75C. The ambient temperature is 20C.
The measurements at the blue dot locations are in this table
x(ft)
|
0.0"
|
0.25"
|
0.0"
|
0.5"
|
0.5"
|
1.0"
|
0.5"
|
0.75"
|
y(ft)
|
0.0"
|
0.25"
|
0.5"
|
0.0"
|
0.5"
|
0.5"
|
1.0"
|
0.75"
|
Temp"(C)
|
20.99
|
25.74"
|
29.7
|
22.34
|
40.48
|
45.75"
|
63.01
|
62.98"
|
a) Estimate the temperature at the green dot locations: (0,1) (1,0) (0.25,0.75) & (0.75, 0.25)
b) Create a contour plot of temperatures on the plate. A contour line is a line of constant
temperature. Do not use any MATLAB built0in function designed for this purpose, e.g. contour or you will receive no credit. The contour lines should be in 10C increments.
c) Estimate the temperatures of the blue and green dot locations if the plate is placed in a location with an ambient temperature of 0C. Print the results in a table.
Problem 2
A 400 gallon cylindrical tank is filled with water. A valve is opened at the bottom of the tank. A five0 gallon jug fills in 21.5 seconds. Flow rate measurements are taken for 2 minutes, and are recorded as follows:
t (seconds)
|
30
|
60
|
90
|
120
|
q (gallons/minute)
|
13.88
|
13.64
|
13.41
|
13.17
|
Use this data to
• Determine how much water will remain in the tank after 60 minutes of draining
• Determine the time it will take to empty half of the water from the tank.
Graph tank volume (gallons) vs time (minutes)
Problem 3
If there are is a group of n people in a room, what is the probability that two or more of them share the same birthday?
Write a MATLAB function to compute the answer by simulation. The function will have n as an input argument, and the computed probability will be the output argument.
Your function will contain the following experiment: Randomly generate n birthdays, using a MATLAB built in random number generator. Use 1 to 365 to represent birthdays, ignoring leap day, and assuming all birthdates are equally probable. Search your results to see if any birthdays match. You may find MATLAB built0in function sort to be helpful.
Please ask before using any other MATLAB built-in functions. The use of MATLAB built-in functions unique and union is not permitted. You will receive zero credit.
This experiment should be repeated 1000 times, and should calculate the fraction of those times in which a match occurred. This is the simulated probability of a birthday match.
Lastly, write a MATLAB script file to
o Print a table of simulated probabilities, in percent, for n = 2,3,... 50
o Graph probability, in percent, vs number of people
The use of outside code is not allowed! This will be considered academic misconduct.