The size of a colony of blue bacteria growing in a petri dish is modeled by the equation where t is time in days. The size of a colony of green bacteria is modeled by the equation where t is again time in days. Both colony sizes are measured in square centimeters. Part A: Graph the growth of both colonies on the same plot over the course of 6 days in one hour increments. One way to get one hour increments is to use a step size of 1/24. Another way is to use linspace and specify that it should create 6days x 24hours evenly spaced values. In either case, make sure you start at 0 days, not 1 day. Make the color of the curve match the color of the bacteria it represents. Give your graph a title and axis labels. Part B: How large is the green bacteria colony when the blue colony reaches its maximum size. You must answer this question using Matlab calculations, not manually entering the answer. To check your work, the blue colony’s maximum size is 270.56 and when it reaches that size, the green colony’s size is 42.109. If you got 270 and 42, but your decimal is slightly off, you’re probably fine
The size of a colony of blue bacteria growing in a petri dish is modeled by the equation where t is time in days. The size of a colony of green bacteria is modeled by the equation where t is again time in days. Both colony sizes are measured in square centimeters.
Part A: Graph the growth of both colonies on the same plot over the course of 6 days in one hour increments. One way to get one hour increments is to use a step size of 1/24. Another way is to use linspace and specify that it should create 6days x 24hours evenly spaced values. In either case, make sure you start at 0 days, not 1 day.
Make the color of the curve match the color of the bacteria it represents. Give your graph a title and axis labels.
Part B: How large is the green bacteria colony when the blue colony reaches its maximum size. You must answer this question using Matlab calculations, not manually entering the answer. To check your work, the blue colony’s maximum size is 270.56 and when it reaches that size, the green colony’s size is 42.109. If you got 270 and 42, but your decimal is slightly off, you’re probably fine
Editable source code:
%use step size to get hourly increment
t = 0:1/24:7;
%given equations
blue = 20*(t.^2) - exp(t);
green = 35*t - (t.^2);
%plot both colonies on same
plot(t,blue,'color','b');
hold on
plot(t,green,'color','g')
xlabel('t')
ylabel('size')
%find the value of green when blue colony is maximum
large_green = green(blue ==max(blue))
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images