Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 3 Random walk [10 points] Write a simulation of a random walk of a particle in a 2d square grid. This simulation will be

Exercise 3 Random walk [10 points] Write a simulation of a random walk of a particle in a 2d square grid. This simulation will be similar to the one you wrote during the lab: The particle starts in the center of the grid. It can move to one of the neighboring cells: up, down, left, or right. The particle cannot move outside the grid: choose a new random direction instead. The only difference is that now not all directions are equally probable: the particle is twice as likely to move up than to move in any of the other three directions (the latter are still equally probable). Perform ten thousand steps on a 101 101 lattice and plot the trajectory of the particle. Extra credit [5 points]: Make an animation of the random walk

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probability and Stochastic Processes A Friendly Introduction for Electrical and Computer Engineers

Authors: Roy D. Yates, David J. Goodman

3rd edition

1118324560, 978-1118324561

More Books

Students also viewed these Mathematics questions