11111111

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

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

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
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

## This note was uploaded on 04/03/2011 for the course BIM 107 taught by Professor Raychaudhari during the Winter '11 term at UC Davis.

Ask a homework question - tutors are online