MATLAP the random walk
The Random Walker
Due April 9th by Midnight
Work in Groups of up to 3 students
Submit exercise via email.
Note: All programming must be done by the
individual groups (NO COPYING). This is a
graded homework activity. Do not use pre-
developed code from the internet.
Exercise:
Create the Random Walker toy that tracks the
movement of n balls as they move through the toy. As
the balls fall down the toy, they can move to either the
right or left of each peg. There are total of 15 levels
with 16 columns to capture each of the balls.
Using a combination of functions, loops, and vectors
to create the Random Walker toy. Create a figure that
includes all of the pegs, and shows each ball
individually dropping through the pegs (Hint use the
drawnow command). At the bottom, show the balls colleting in columns.
Increase the number of balls. How does this change the distribution?
Resources:
https://www.youtube.com/watch?v=5jQwZ2VgRZQ
https://en.wikipedia.org/wiki/Normal_distribution
https://en.wikipedia.org/wiki/Random_walk