2015F001/Homework 10

From CDS 130

Jump to: navigation, search

Contents

  1. Area estimation
  2. Integration
  3. Calculation of PI
  4. Population Eqn.
  5. Bacteria colony growth
  6. Radioactive Decay

1. Area estimation

Using Matlab to estimate the percentage of the area of the white shape in the box. You need to complete the matlab code provided below to obtain the image matrix.

area

In matlab, the follow code can be used to obtain a matrix (denoted as X) to represent the picture.

clear all; clc; 
M = imread('http://cds130.org/wiki/images/Iregular.jpg');
[X, map] = rgb2ind(M, 2); % the image matrix contains two colors only.  
image(X);
colormap(map)
colorbar
[m, n] =size(X); % m and n correspond to the size of the image matrix. 

2. Integration

Given two mathematical functions f(x) = 1/x * e^{-(\ln(x) -1)^2} and g(x) = sin2(x) − 0.5, calculate the area between the two curves from x=1.4 to x = 6.6 as shown in the following figure.

image: 2013F004_homework9_Q3.jpeg

3. Calculation of PI

4. Area of an Ellipse. Suppose that we have an ellipse with major axis length 2a and minor axis length 2b. Without changing the answer to the problem, suppose that the major axis is on the x-axis. How do we find the area of the ellipse? (assuming a = 2 and b = 1; or any other values you want to use.) Recall that the equation of an ellipse like the one picture above is given by: x2 / a2 + y2 / b2 = 1

image: 2013F004_homework9_Q4.jpeg

4. Population Eqn.

Consider the following model of population

Every year, population increases a value of 10% of the population in the previous year. However, if the predicted population is over 100, a disease outbreak instantly kills 80% of this predicted population value. For example, if the predicted population is 110, then the next year the population is 0.2*110.

Use Matlab to plot population as a function of time for 40 years. Assume that the initial population is 20.

5. Bacteria colony growth

Suppose a colony of 10000 bacteria is multiplying at the rate of r = 0.8 per hour per individual (i.e., an individual produces an average of 0.8 offspring every hour). How many bacteria are there after 10 hours? Assuming that the colony grows continuously and without restriction.

6. Radioactive Decay

The basic equation for modeling radioactive decay is

dX / dt = − rX

where X is the amount of the radioactive substance at time t and r is the decay rate. Some radioactive substances decay into other radioactive substances which decay in turn. For example, Strontinum (r1 = 0.256 /hr) decays into Yttirum 92 ( r2 = 0.127 /hr ), which decays into Zirconium.

Starting at t = 0 with 5x1026 atoms of Strontium 92 and none of Yttrium. After 8 hours, how what are the compositions of the components?

Personal tools