I see theres solution posted but its done in Mathmaticaformat.
Can someone show me the solution using Matlab, please? Considera particle in a room. How likely is the particle to hit the eastwall of the room? Assume the western wall repels the particles andthere is no vertical motion. The position at a subsequent time isrelated to the current position by x^n+1 = z^n + f(x^n) + Noisewhere f(x) = k/x^2 so that the force away from the western wall atx = 0 is proportional to the inverse of the distance squared. Thenoise is given by e times a random number between minus one andone. The eastern wall is taken to be at x = 5 and the constant ofproportionality for the repulsive force is k = 0.5, with a noiseamplitude of 1. Run at least 200 experiments and determine how manyruns it took to reach the eastern wall. Plot the results.