<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nemenmanlab.org/~ilya/index.php?action=history&amp;feed=atom&amp;title=Physics_212%2C_2018%3A_Lectures_4</id>
	<title>Physics 212, 2018: Lectures 4 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nemenmanlab.org/~ilya/index.php?action=history&amp;feed=atom&amp;title=Physics_212%2C_2018%3A_Lectures_4"/>
	<link rel="alternate" type="text/html" href="https://nemenmanlab.org/~ilya/index.php?title=Physics_212,_2018:_Lectures_4&amp;action=history"/>
	<updated>2026-05-17T17:41:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://nemenmanlab.org/~ilya/index.php?title=Physics_212,_2018:_Lectures_4&amp;diff=723&amp;oldid=prev</id>
		<title>Ilya: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://nemenmanlab.org/~ilya/index.php?title=Physics_212,_2018:_Lectures_4&amp;diff=723&amp;oldid=prev"/>
		<updated>2018-07-04T16:28:45Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 16:28, 4 July 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Ilya</name></author>
		
	</entry>
	<entry>
		<id>https://nemenmanlab.org/~ilya/index.php?title=Physics_212,_2018:_Lectures_4&amp;diff=722&amp;oldid=prev</id>
		<title>nemenman&gt;Ilya: Created page with &quot;{{PHYS212-2018}}  In this lecture, we continue learning the basics of computational modeling and Python language using the simple linear (,malthusian) growth model.  ==Finishi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://nemenmanlab.org/~ilya/index.php?title=Physics_212,_2018:_Lectures_4&amp;diff=722&amp;oldid=prev"/>
		<updated>2018-01-31T14:35:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{PHYS212-2018}}  In this lecture, we continue learning the basics of computational modeling and Python language using the simple linear (,malthusian) growth model.  ==Finishi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{PHYS212-2018}}&lt;br /&gt;
&lt;br /&gt;
In this lecture, we continue learning the basics of computational modeling and Python language using the simple linear (,malthusian) growth model.&lt;br /&gt;
&lt;br /&gt;
==Finishing up from the previous lecture==&lt;br /&gt;
;Your work: explore how the solution spends on dt. Output results only when t is an integer.&lt;br /&gt;
&lt;br /&gt;
==New Python constructions==&lt;br /&gt;
*Objects -- mutable (arrays and lists) vs. immutable (numbers)&lt;br /&gt;
**Object attributes and object methods, using dir()&lt;br /&gt;
**Overloading methods&lt;br /&gt;
*Variables vs. objects&lt;br /&gt;
*Lists vs. Numpy arrays&lt;br /&gt;
**Why  np.zeros((2,4)) and not  np.zeros(2,4)?&lt;br /&gt;
*Creation, concatenation (stacking).&lt;br /&gt;
*Slicing -- doesn't create new arrays&lt;br /&gt;
*Flatten copies data, ravel and reshape does not&lt;br /&gt;
*Strings&lt;br /&gt;
*Loops&lt;br /&gt;
*Vector math is always faster than element-by-element math&lt;br /&gt;
&lt;br /&gt;
==Basic plotting==&lt;br /&gt;
*Section 3.3.1&lt;br /&gt;
*[[media:malthus1.txt | Malthusian growth with a loop and with plotting]]&lt;br /&gt;
*;Your work: plot sin(x) for x between 0 and pi. Only plot the positive part of the vertical axis. Label axes.&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/forms/d/e/1FAIpQLSeNvrPddCgvMfHdlSA8uYDddBFqLK81Rrr4l7jfozud6J7iww/viewform Submit your work].&lt;br /&gt;
&lt;br /&gt;
==Our simplest model==&lt;br /&gt;
A real environment won't have resources that are capable of supporting an infinite bacterial population. Thus as the population grows, the growth rate should decrease. The simplest assumption is that it decreases linearly &amp;lt;math&amp;gt;r(n)=r_0-r_1n&amp;lt;/math&amp;gt;. This gives for the growth: &amp;lt;math&amp;gt;\frac{dn}{dt}=(r_0-r_1n)n=r_0n\left(1-\frac{n}{r_0/r_1}\right)&amp;lt;/math&amp;gt;. Or, in other words, &amp;lt;math&amp;gt;\frac{dn}{dt}=r_0n\left(1-\frac{n}{N_0}\right)&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;N_0&amp;lt;/math&amp;gt; is the carrying capacity -- the number of bacteria where there growth rate is equal to 0, and the population stabilizes.&lt;/div&gt;</summary>
		<author><name>nemenman&gt;Ilya</name></author>
		
	</entry>
</feed>