Question: Using MATLAB create a movie that simulates a random walk on a 1000 x 1000 grid. Start the walk in the center (500 x 500)
Using MATLAB create a movie that simulates a random walk on a 1000 x 1000 grid. Start the walk in the center (500 x 500) and increase/decrease x and y by, about, 10 units depending on the value of rand.
*For example, If the value of rand is less than .25, increase both x and y by 10. If the value of rand is less than .5 but greater than .25, decrease x by 10 and increase y by 10, etc.
You can run your walk for a set number of iterations or have it walk until it reaches the border of the plot window. Update the plot title with the current x,y values. Save your movie as an AVI file.
Please show all work. Thanks!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
