function A=schelling2(M,N,f1,f0) % The parameters f1 and f0 measure discontent. Example: if f1=.8 and f0=.6, % then a red is discontent if more than 80% of its neighbors are blue, and a % blue is discontent if more than 60% of its neighbors are red. A=rou
Homework 8: The Schelling Experiment
In 1971, Thomas C. Schelling performed the following experiment. Consider a population which consists of 2 dierent groups of people, let us call them reds and blues. On a rectangular grid randomly assign to each positi
Homework 7: Dierential Equations
This week, you will submit 2 jpgs and 2 diary les, one for each problem. Be sure to clean up your diary le before submitting it. 1. Consider the initial value problem
dy dt
= t2 et 3y with y (0) = 1.
Using dsolve nd the e
Homework 6: Graphics
This week, you will create four plots, and submit them along with a diary le containing your work for all four problems. Be sure to clean up your diary le and label the problems within it (alternatively, you can submit four diary les,
Homework 5: Functions and Control Flow
This week you will submit three function M-les and two jpeg plots (for problem 3). These M-les should be named geom.m, crossprod.m and collatz.m. We will be executing your les in order to check your work, so the le n
Intro to Maple
1. Introduction Maple is a symbolic computation system or computer algebra system. That is, it manipulates information symbolically or algebraically as opposed to just numerically. Nevertheless, it does have numerical manipulation abilities
Homework 9: Intro to Maple
This week, you will turn in a single worksheet (either a .mw or .mws le). Start a new worksheet. Make a title called Homework 9 using the P Title style. Follow the heading by your name using the P Author style. Label each of you
MATLAB Lecture 3
1. Introduction Today we will use MATLAB to numerically solve ordinary dierential equations. 2. Differential Equations They dynamic behavior of systems is an important subject. A mechanical system involves displacements, velocities and ac
MATLAB Lecture 2
1. Introduction Today we create 2-dimensional and 3-dimensional plots. Once again, you should create a new directory for todays exercises.
2. 2-D Graphics 2.1. The Plot Command. We have already seen the plot command, which is the most com
MATLAB Lecture 1
1. Introduction MATLAB is a sofware package for high performance numerical computation and visualization. Its name is an abbreviation of Matrix Laboratory. Perhaps the best introduction to MATLAB is to compare it to Mathematica:
Calculati
Homework 12
Greggo Johnson November 7, 2010
Instructions
Create a single article containing the following: 1. Include a title with the homework number, your name and the date on separate lines. 2. You article should start by displaying the following:
Deni
Gregory Johnson Math 21-126 Homework 1
1
Lines
Denition 1.1. A vertical line is a set of all points satisfying the equation x = c for some xed constant c. Let f (x) = mx + b be a linear function. We call the graph of f a (nonvertical) line. m is called th