In a one-dimensioni random walk, the position x of a walker is computed by: xj = xj
Question:
xj = xj + s
where s is a random number. Write a program that calculates the number of steps required for the walker to reach a boundary x = ±B. Use MATLAB's built-in function randn (1, 1) to calculates. Run the program 100 times (by using a loop) and calculate the average number of steps when B = 10.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: