ps4solnsSp06

# ps4solnsSp06 - %Engineering 6 Spring 2006 Problem 4.1...

This preview shows pages 1–2. Sign up to view the full content.

%Engineering 6, Spring 2006, Problem 4.1 Solution %(Bacteria population growth) %Turn off extra line breaks in display format compact ; %Clear command window and variables clc; clear; %Define variable for initial population P0 = 100; %Define doubling times for each type of bacteria d1 = 6; d2 = 12; d3 = 24; %Define vector of time values (10 days, in number of hours) t = 24*(1:10); %Calculate population growth for each type at 24-hour intervals P1 = P0*2.^(t/d1); P2 = P0*2.^(t/d2); P3 = P0*2.^(t/d3); %Create table of results table = [P1' P2' P3']; %Set display format to "good" (will either display a %number in fixed or exponential format, depending on which %is shorter). format short g ; %Display results disp( 'Population Growth of Bacteria from Initial Population of 100' ); disp( ' Bacteria 1 Bacteria 2 Bacteria 3' ); disp(table); Displayed results: Population Growth of Bacteria from Initial Population of 100 Bacteria 1 Bacteria 2 Bacteria 3 1600 400 200 25600 1600 400

This preview has intentionally blurred sections. Sign up to view the full version.

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

## This note was uploaded on 01/22/2011 for the course ENG 006 taught by Professor Lagerstrom during the Spring '06 term at UC Davis.

### Page1 / 5

ps4solnsSp06 - %Engineering 6 Spring 2006 Problem 4.1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online