Homework 2_partone

# Homework 2_partone - x(i = a*x(i-1(1-x(i-1 end subplot(5,1,3 plot(time,x population for when a = 3.5 a = 3.5 time(1)=0 x(1 = 0.1 for i = 2:31

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

% Problem 1 Script File % population for when a = 0.6 clear a = 0.6; time(1)=0; x(1) = 0.1; for i = 2:31; time(i) = i-1; x(i) = a*x(i-1)*(1-x(i-1)); end subplot(5,1,1), plot (time,x) % population for when a = 2.0 a = 2.0; time(1)=0; x(1) = 0.1; for i = 2:31; time(i) = i-1; x(i) = a*x(i-1)*(1-x(i-1)); end subplot(5,1,2), plot (time,x) % population for when a = 3.3 a = 3.3; time(1)=0; x(1) = 0.1; for i = 2:31; time(i) = i-1;
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x(i) = a*x(i-1)*(1-x(i-1)); end subplot(5,1,3), plot (time,x) % population for when a = 3.5 a = 3.5; time(1)=0; x(1) = 0.1; for i = 2:31; time(i) = i-1; x(i) = a*x(i-1)*(1-x(i-1)); end subplot(5,1,4), plot (time,x) % population for when a = 4.0 a = 4.0; time(1)=0; x(1) = 0.1; for i = 2:31; time(i) = i-1; x(i) = a*x(i-1)*(1-x(i-1)); end subplot(5,1,5), plot (time,x)...
View Full Document

## This note was uploaded on 04/11/2009 for the course ENG 100 taught by Professor Delwiche during the Spring '08 term at UC Davis.

Ask a homework question - tutors are online