11111111 - there are no boundary conditions to worry...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
BIM 107 Winter 2011 Problem set 1 (MATLAB Programming & Monte Carlo Simulation) 1. Write a MATLAB program that can calculate Use your program to evaluate the sum for N = 101. 2. (a) Use Monte Carlo Method (on MATLAB) to simulate the random walk of a single random walker on a one-dimensional integer lattice. This random walker is allowed only two moves, move to the any of the two nearest neighbor sites with P R = P L = 0.5 (P R probability for moving to the right, P L probability for moving to the left). Run each simulation for 1000 time steps all with infinitely large lattices (therefore
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: there are no boundary conditions to worry about). Choose the initial (t = 0) coordinate to be zero for all runs. Show plots of some of the individual runs of the simulations. . (b) Repeat the exercise in part (a) with (i) P R = 0.7, P L = 0.3 and (ii) P R = 0.0, P L = 1.0. Note: Your MatLab code should be commented using % to explain to someone who has never seen your code what you are doing at each step. If you do not comment your code, I cannot tell what is going on, and you cannot get points. S N = 1 2 + 3 2 + 5 2 + ........... + N 2...
View Full Document

Ask a homework question - tutors are online