Code using matlab
Create a 101 by 101 matrix of zeros. Place a particle at thecenter of the grid by assigning a 1 there. Allow the particle tohave an equal probability of moving in any of the four directionsup, left, down, or right. Run the simulation until the particlereaches the boundary. Record the number of movements the particleneeded to make in order to reach the boundary. Repeat this 10,000times and report the average number of movements the particle makesduring each run
Expert Answer
An answer will be send to you shortly. . . . .