Question

Exercise: Bacteria Growth and Interpretation You can see that doing this with a for loop can be easier than repeatedly typing MATLAB

Thank you!
0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc;
close all;
clear all;

t1=1:0.1:24;
j=1;
for a=1:0.1:2 % a increments with 0.1 step size
i=1;
for t=1:0.1:24 % t increments with 0.1 step size
p(i)=(1000/a)*exp(0.5*a*t);
i=i+1;
end
b(j)=plot(t1,p);
j=j+1;
hold on
end
hold off
xlabel('time');
ylabel('p(t)');
title('bacterial growth');
%plot marks, just to label plots for different values of a
M1 = "a=1";
M2 = "a=1.1";
M3 = "a=1.2";
M4 = "a=1.3";
M5 = "a=1.4";
M6 = "a=1.5";
M7 = "a=1.6";
M8 = "a=1.7";
M9 = "a=1.8";
M10 = "a=1.9";
M11 = "a=2";

legend([b(1),b(2),b(3),b(4),b(5),b(6),b(7),b(8),b(9),b(10),b(11)],[M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11]);



bacterial growth x 10 14 12 a1.3 a=1.4 10 a=1.7 8 a:1.9 a-2 6 4 2 0 15 20 25 10 time

1) from the above figure, it was derivable that with increasing value of a the rate of growth of bacteria increased.

2)from the fig(2), it can be realized as t-->infinity(t=1000) the maximum growth rate was observed for a=2. we believe that for further increasing a, the growth rate increases.

bacterial growth 17879710307 a=1 a=1.1 a=1.2 ㅡㅡ a=1.3 a=1.4 11.4399 a=1.6 a=1.7 a=1.8 a=1.9 a-2 0 100 200 300 400 500 600 700

fig(2)

4) Matrix math by hand approach works for smaller time sets making derivation of conclusions being more based on human understanding while Matlab based approach enables a broader view of data for higher time set consideration.

For for loop, Matlab usually employs quite a slow approach. One aspect of Matlab, being the vectorized approach provides faster conclusion.

Add a comment
Know the answer?
Add Answer to:
MATLAB Thank you! Exercise: Bacteria Growth and Interpretation You can see that doing this with a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Matlab Matlab Matlab Matlab, Please solve this problem Problem 4 : Runge's phenomenon For this proble,...

    Matlab Matlab Matlab Matlab, Please solve this problem Problem 4 : Runge's phenomenon For this proble, you wil interpolate the function h(x) = tanh(10x) in I [a, b, through n datapoints (xi, hx with equidistant nodes for several values of n, and observe the behavior of the interpolating polynomial as n increases. You should use the pair of functions polyfit and polyval In your prob40: (a) Interpolate the function tanh(10x) in [-1,1] using a uniform grid of n nodes, where...

  • I only need MATLAB solution with commands The damping ratio, ^, effects the performance of a...

    I only need MATLAB solution with commands The damping ratio, ^, effects the performance of a system. Using MATLAB, for a single loop second order feedback system, find the step response of the system for values of wn 1 and = 0.1, 0.4, 0.7 , 1.0 and 2.0 E(s) R(s) G(s) Y(s) s(s +2,) Plot all the results in the same figure window and fill in the following table. Rise Time Peak Time % Overshoot Settling Time Steady State Value...

  • If you can provide the MatLab code too, thank you! 3. The equation of motion of...

    If you can provide the MatLab code too, thank you! 3. The equation of motion of a general mass-spring system subject to an external force F(t) is mr" + cr' + kr = F(t) where m, c and k are the mass, damping coefficient and spring constant respectively. Let's consider a simple undamped system where m = 1, k = 1, and c= 0 and with forcing function F(t) = 0.5 cos(t) (all in SI units) "+=0.5 cos(1) Find the...

  • Write a short matlab function that modifies the volume of a wavefile. The function should have...

    Write a short matlab function that modifies the volume of a wavefile. The function should have the following parameters: the input wavefile path, the signed value in dB which amplifies/attenuates the wavefile, the output wavefile. Make use of the following functions: wavread (or audioread), wavwrite (or audiowrite), plot, figure, subplot. Also use "help <function>" to see the meaning and parameters of these functions. Parse the wave samples using a for loop. Plot the input wave and the output wave on...

  • help with this matlab problem asap thank you.... Exercise 2: Fourier Transform properties (a) Time Scaling....

    help with this matlab problem asap thank you.... Exercise 2: Fourier Transform properties (a) Time Scaling. Create an M-file and: 1. Plot the waveform s(t)sinc(at/0.5) where a1 and t fro5 tot4.99 (seconds) in 0.01 increments. 2. Plot the amplitude spectrum of s(t). Comment the figure. 3. Repeat (a.1) and (a.2) for α-2. How do this signals compare in tune? How do their bandwidths compare? (b) Time Shifting. Create an M-file and: 1. Plot s(t)rectpuls(t) and s2(t)rectpuls(t 2.5), where t is...

  • Please use Matlab for coding and good commentary please. Thank you. 6. [15] In this question...

    Please use Matlab for coding and good commentary please. Thank you. 6. [15] In this question you will write a user-defined function, which contains one sub-function. Create a vector t with exactly 20001 components starting at 0 and ending with 200. Now you will use this vector t and MATLAB's plot3 to create a curve in 3D given by the parametric equations: X(t) = t. y(t) = 1- tz(t) = A for-loop must then be used to start on the...

  • MATLAB question I need the code exactly as you would write it in MATLAB. thank you...

    MATLAB question I need the code exactly as you would write it in MATLAB. thank you 1. Consider a Gaussian solution of the traveling-wave form ψ(z,t)-exp(-a(z-vt)2). The parameter values are a 1, 2. (a) Explain the physical meaning of these parameters (eg. what would happen if we took a = 10 instead?) Determine the direction of propagation of this solution: Is it traweling to the left or to the right? (2pts) (b) Write a Matlab code to plot the Gaussian...

  • The purpose of this problem is to become familiar with the use of MATLAB. Consider the...

    The purpose of this problem is to become familiar with the use of MATLAB. Consider the continuous-time function x(t) 2e0.5sin(87t)u(t), where u(t) is the unit step function. a) (10 points) Design a MATLAB routine to plot x(t) from t -5 to t = 5 using 10, 100, and 1000 equally spaced samples. The following MATLAB code fragment suggests how this 11. can be done (using 1000 equally spaced samples). Note that the function provided by MATLAB, but can be easily...

  • 3) Given three sinusoids with the following amplitude and phases (t)-Scos(2x (1200+0.25x) a. Create a MATLAB...

    3) Given three sinusoids with the following amplitude and phases (t)-Scos(2x (1200+0.25x) a. Create a MATLAB program to sample each sinusoid and generate a sum of three sinusoids, that is, х(n)=x1(nHx:(n)+xy(n), using a sampling rate of 8000 Hz, and plot the sum x(n) over a range of time that will exhibit approximately 0.1 second. (10 pts) b. Use the MATLAB function fO to compute DFT coefficients, and plot and examine the spectrum of the signal x(n).(10 pts Write a MATLAB...

  • PLEASE USE MATLAB COMMANDS THANK YOU Use Matlab to graph the functions f(x) = 3xsin(3x) and...

    PLEASE USE MATLAB COMMANDS THANK YOU Use Matlab to graph the functions f(x) = 3xsin(3x) and g(x)= 12 - 2x² so that you can read off the point(s) of intersection (if any), accurate up to two decimal places. 1) Write down the Matlab command(s) you used to create the x-vector. 2) Write down the Matlab command(s) you used to produce the vectors containing the f- and g-function values. 3) Write down the Matlab command(s) you used to plot the graphs....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT