CDS 130 Exam Review MY COPY-Tryfona PDF

Title CDS 130 Exam Review MY COPY-Tryfona
Course Computing For Scientists
Institution George Mason University
Pages 8
File Size 140.4 KB
File Type PDF
Total Downloads 87
Total Views 140

Summary

Highly recommend using this exam review to study for CDS 130....


Description

Things I’ve seen in the past:    

New variables not used Image processing patterns wrong Not paying attention to semicolons and what is really being asked for output Sterilization: o A KEY IDEA in that problem is what “sterilize” means. Of course, it means that

the bacterial birth rate is set equal to 0.0 – sterilized organisms lose their reproductive capacity! This is bound to be something that the students may not recognize, or, may implement incorrectly. I say this precisely because I had many questions on what “sterilize” means. In previous homeworks, I always reduced the birth rate, but it never became zero. And, when the birth rate becomes zero, what does that imply about how the growth curve looks? Well, seems to me . . . it would be a flat line! That’s a very graphical way to illustrate the ramifications of “sterilize.” 1.)

clear; clc a = [1, 3, -5, -7, 0]; b = [-4, 2, -10, 8, -6]; for m = 2:4 if mod(m,2) == 1 a(m) = a(m) - b(m-1); else b(m+1) = b(m) - a(m+1); end end a b a =

1

b =

-4

3

-7

2

-7

7

0

8

8

2.)

clear; clc a = 3; b = 2; c = 1; for m = 1:3 for n = 1:3 if n < m a = b - c; elseif n == m b = a + 1; else c = 2*b - a; end end end a b c a =

-1

b =

0

c =

1

3.)

counter = 5; A = 1:5; while (counter = 3 wolves(t+1) = wolves(t+1) + 22; end wolves(t+1) = floor(wolves(t+1)); %remember flooring! end wolves(22) figure(1) plot(1:22,wolves)

12.) A student has an agar-filled petri dish that is initially streak-scored with 500 “bacteria M” cells at the beginning of hour 1. The generation time for bacteria M is 1 hour: bacteria M’s population doubles in size every 1 hour, i.e., bacteria M’s growth rate is 100%. At the end of hour 9, the agar plate is inadvertently exposed to UV light, which immediately kills 90% of the existing bacteria, and also reduces their growth rate from 100% to 15%. However, at the end of hour 15 the student returns to the lab, discovers the mistake, and adds a small amount of growth promoter to the bacterial colony on the plate. The growth promoter instantly raises the bacteria’s growth rate from 15% to 55%. How many live bacteria exist on the agar plate at the end of hour 20? Provide a plot of the size of the bacteria’s population over time, through the end of hour 20. clear;clc B(1) = 500; birth = 1.0; death = 0.0; deltat = 1.0; for t = 1:20 B(t+1) = B(t) + deltat*(birth - death)*B(t); if t == 9 B(t+1) = 0.10*B(t+1); birth = 0.15; end if t == 15 birth = 0.55; end end B(21) plot(1:21, B(1:21))

%compute %correct #1

%correct #2...


Similar Free PDFs