Omniadisce

Computational physics 18.2: Many walkers at once

Lesson Beginner

Join free to take this lesson

Anyone can look around, but taking a lesson needs a free account. With one, your answers are checked step by step and your progress is saved, so you can stop and pick up where you left off on any device.

11 steps ยท about 25 min

By the end you can

  • Simulate a crowd of walkers with a loop, one walker at a time
  • Make a whole table of steps at once with size=(walkers, steps)
  • Add along each row with np.sum(steps, axis=1)
  • See that the crowd's mean stays near the start while the walkers spread out

Who it is for: Anyone who has done lesson 18.1, and lesson 15.4 (a grid of points, rows and columns).

The steps

  1. A crowd from the lamp post
  2. A crowd with a loop
  3. A table of steps: size=(walkers, steps)
  4. Rows and columns
  5. Adding along each row: axis=1
  6. Which axis?
  7. Every walker's end
  8. The crowd's mean
  9. The crowd's mean
  10. Staying put?
  11. What a crowd shows

Discussion 0 comments

Log in to join the discussion.

× Enlarged view