Question
MatLab Brownian motion is the random motion of particles suspended in a fluid (a liquid or a gas) resulting from their collision with the quick
MatLab
Brownian motion is the random motion of particles suspended in a fluid (a liquid or a gas) resulting from their collision with the quick atoms or molecules in the gas or liquid. In this problem you will create a program to simulate Brownian motion. Imagine a bead travels in a limited space defined by 0x100, 0y100. Every 0.01 second, the bead travels to its next position, which could randomly be 1 among 9 possibilities (it could stay where it is).
If the bead is at the boundary and its next position is predicted to be out of the boundary,
it will actually be bounced back according to normal physical model. For example, if a
bead is at (100, 50), and its next position is predicted be (101, 51), then its actual next
position will be (99, 51).
1. Write a program to calculate the coordinates of the bead in 1 sec (which means it
travels 100 times), starting from (x, y) = (50, 50). And use plot(x, y, ^) with hold
on to display all the spots it traveled through on a same figure.
2. On another figure, plot all the spots it traveled through in 10 sec (1000 times).
3 On another figure, plot all the spots it traveled through in 100 sec (10000 times).
4. Use pause function in the loop so that the spots are generated one after another,
to monitor the movement of the bead.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started