Question: Matlab- Random Walk II: A random walk is a particular kind of probabilistic simulation that models certain statistical systems such as Brownian motion of molecules.
Matlab-
Random Walk II: A random walk is a particular kind of probabilistic simulation that models certain statistical systems such as Brownian motion of molecules. You can think of a one-dimensional random walk in terms of coin flipping. If you flip a coin as heads (x>.5) you take a step forward. If you flip a coin as tails (x<.5) you take a step back. Write a program that takes as input the number of steps nsteps for a random walk, and simulate 5 random walks per run. Allow the random walk to move in two dimensions, saving the locations of each step. Plot the path of the random walk, using different colors for each line. Show the simulationg for 10, 100 and 1000 nsteps. Please submit a jpg of the graph as well.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
