Bi1x_Assignment1_Matlab_solution_2011

Bi1x_Assignment1_Mat - step=0.1 Total Integration time TotalTime=10 The initial conditions is N0=0.01 Now do it for the actual integration We'll

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
% Bi1x Spring 2011 Assignment 1 Answer Key % Problem 1: Ligand binding Kd=100; %Dissociation constant in units of nM L=[1:1000]; %Ligand concentration p=L./Kd./(1+L./Kd); %probability of receptor occupancy %plot probability of receptor occupancy as a function of ligand %concentration figure, plot(L,p) xlabel( 'Ligand concentraion [nM]' ) ylabel( 'Probability' ) title( 'Binding Curve' ) % Problem 2: Matrix manipulation M=[1 2 3;4 5 6;7 8 9] %Create a matrix M(1,1) %Get elements M_11 M(2,3) %Get elements M_23 M(:,1) %Get first column M(1,:) %Get first row M.*pi %Multiply matrix by pi % Problem 3: Logistic growth r=1; % rate constant in the logistic equation K=1; % saturation population size % choose a step that is much smaller than the smallest time scale in the % problem
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the 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(m-1)+r*step*N(m-1)*(1-N(m-1)); % logistic equation m=m+1; % increment the counter end Times=0:step:TotalTime; % create a vector of times for x-axis 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

This document was uploaded on 01/03/2012.

Page1 / 3

Bi1x_Assignment1_Mat - step=0.1 Total Integration time TotalTime=10 The initial conditions is N0=0.01 Now do it for the actual integration We'll

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online