Question: **Please do it in Matlab!** Write a program that performs M random walks of N steps in two dimensions on a square lattice, assuming that

**Please do it in Matlab!**

**Please do it in Matlab!** Write a program that performs M random

Write a program that performs M random walks of N steps in two dimensions on a square lattice, assuming that each step is chosen at random, and each of the four possible directions are equally probable. Run the program for M-1000 walkers who are all originally at the origin. Allow the walkers to take at least 1000 steps a) b) c) What is the qualitative nature of the distribution of walkers at the end of the simulation? Use a plotting program to draw maps of several independent random walks and discuss. Compute the mean displacement vector by ensemble averaging xy and yN over the M random walks, for different values of N. Plot as a function of N. d) Compute the mean square displacement by ensemble averaging Ry over the M random walks, for different values of N. Plot as a function of N on a linear-linear plot, and a log-log plot

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!