Matlab 3

Matlab 3 - Exercise 3.1 a) b) r = log(6.46/6.09) r= 0.0590...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Exercise 3.1 a) b) r = log(6.46/6.09) r= 0.0590 Exercise 3.2 a) P(-2) ans = 5.4124 >> (P(-2)-5.28)/5.28*100 ans = 2.5069 >> P(1) ans = 6.4600 >> 100*(P(1)-6.46)/6.46 ans = 0 >> 100*(P(3)-7.22)/7.22 ans = 0.6760 >> P(3) ans = 7.2688 b) P(9) ans = 10.3551 >> 100*(P(9)-8.91)/8.91 ans = 16.2189 >> 100*(P(10)-9.08)/9.08 ans = 20.9717 >> P(10) ans = 10.9842 The model starts to become unacceptably inaccurate around 2025 where the error is about %3.4. Exercise 3.3 a) The population in 2200 is about 65 billion. 70 60 50 40 30 20 10 0 0 5 10 15 20 25 30 35 40 b) As the population gets larger the rate at which is grows gets smaller because food and space are finite. Exercise 3.4 a) For y almost equal to M, you get very small values of dy/dt. For y>>M, dy/dt is a large negative number. The population stays about the same when y is around M and it decreases when y >>M. b) y ' = k y (1 - y/M) 15 k=1 M = 10 10 y 5 0 0 1 2 3 4 5 t 6 7 8 9 10 c) All y tends to 10 billion so greater than 10 decreases, less than 10 increases, and exactly 10 stays exactly 10. The name carrying capacity is so-called because it describes the maximum number the population can carry. d) It was successful because the population doesn't continue to grow exponentially, rather it increases decreasingly as it approaches M, which is what we would expect. Exercise 3.5 a) dsolve('Dy = (k/M)*y*(M-y)') ans = M/(1+exp(-k*t)*C1*M) y will go to 1 as t goes to infinity because the negative exponent becomes zero and eliminates everything but the 1. b) y0 = 6.09 y0 = 6.0900 >> y1 = 6.46 y1 = 6.4600 >> y2 = 6.84 y2 = 6.8400 >> M = (2*y0*y1*y2-y1^2*y0-y1^2*y2)/(y2*y0-y1^2) M= 18.4110 c) B = M/6.09 - 1 B= 2.0232 >> k = -log((M-6.46)/(B*6.46)) k= 0.0895 Exercise 3.6 a) V = M/(1 + B*exp(-k*t)) >> V = subs(V) V= 5182235796219965/281474976710656/ (1+4555734893992867/2251799813685248*exp(3223547011581737/36028797018963968*t)) >> V = inline (char(V)) V= Inline function: V(t) = 5182235796219965/281474976710656/ (1+4555734893992867/2251799813685248*exp(3223547011581737/36028797018963968*t)) b) 100*(100*(V(-2)-5.28)/5.28 ans = 1.9697 >> 100*(V(1)-6.46)/6.46 ans = 1.3749e-014 100*(V(4)-7.58)/7.58 ans = 0.5963 c) 100*(V(9)-8.91)/8.91 ans = 8.5082 >> 100*(V(10)-9.08)/9.08 ans = 10.9875 Exercise 3.7 P = 'A*exp(r*x)' P= A*exp(r*x) >> P = subs(P) P= 609/100*exp(2125022982391079/36028797018963968*x) >> P = inline(char(P)); >> fplot(P, [-10 20]); >> hold on; >> fplot (V, [-10, 20], 'r') >> grid on; 20 18 16 14 12 10 8 6 4 2 -10 -5 0 5 10 15 20 The blue equation is a straight exponential graph and so it increases without leveling out, whereas the red equation is M/(1+e^(-kt)*B), which grows like a normal exponential graph when t is negative, but slows down when t becomes positive. This accounts for the two graph's similarity early on and their difference later. Matlab 3 Leonard Harpster A06802204 C03 ...
View Full Document

Ask a homework question - tutors are online