This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: step=0.1; % Total Integration time TotalTime=10; % The initial conditions is N0=0.01; % Now, do it for the actual integration % We'll have our time information in the vector N N(1)=N0; % m is a counter that we will use in the for loop m=2; for i=step:step:TotalTime N(m)=N(m1)+r*step*N(m1)*(1N(m1)); % logistic equation m=m+1; % increment the counter end Times=0:step:TotalTime; % create a vector of times for xaxis figure,plot(Times,N, 'b' ) xlabel( 'Time' ) ylabel( 'Number of cells' ) title( 'Logistic Growth' ) M = 1 2 3 4 5 6 7 8 9 ans = 1 ans = 6 1 ans = 1 4 7 ans = 1 2 3 ans = 3.1416 6.2832 9.4248 12.5664 15.7080 18.8496 21.9911 25.1327 28.2743 2 Published with MATLAB® 7.10 3...
View
Full Document
 Fall '09
 Population Ecology, ylabel, Logistic function, 11 m, 23 M

Click to edit the document details