Tony's Utah Homepage
Link to Math 1070: Math 1070 - Fall 2008
Here are links to codeless programs for Math 5040 as m-files. Follow the comments and use the MATLAB help files to write the code. If you have specific questions about the code then you may contact me at lam@math.utah.edu.
n_objectsC - Generate a vector A such that A(k) = k.
randwalkC - Simulate a random walk.
rsrandwalkC - Simulate a random step random walk.
rndwalk2C - Simulate a simple 2-dimensional random walk.
Remember that the above files are codeless. Here is an example of a fun program similar to a random walk that actually contains code:
randwalkST
randwalkST simulates the number of steps it takes to start from a wealth of $x and reach a wealth of either $y or $z, whichever comes first. That's right - it's a stopping time!!