Simulation of Random Walk

Random walk model is made to explain the Brownian motion.

您现在正在关注此提交

In this simulation, we assume that there's a group of drunkards walking from same area at the same time. Then we can make the following hypothesis. The walking speed is same and they cannot affect each other. The distance of a step they walk is distributed uniformly in a certain range. After some walks, it is obvious that there will be a distribution for the number of drunkards on the plain. What we do is to display the probability density function by simulation. It can be proved that the distribution is subject to the Weibull distribution.The function is,
f=6r*exp(-3*r^2/(na^2))/(na^2)
f —— describes the probability density of the drunkards at distance r
n —— describes the number of steps they have walked
a —— describes the range of a drunkard walked each time

We can see from the simulation that the theoretical function is quite similar with the experimental function, showing the correctness of this model. If you want to know the theoretical model of this simulation, contact the author by email.

引用格式

QiQin Zhan (2026). Simulation of Random Walk (https://ww2.mathworks.cn/matlabcentral/fileexchange/45536-simulation-of-random-walk), MATLAB Central File Exchange. 检索时间: .

致谢

参考作品: Maximize window, export_fig

类别

Help CenterMATLAB Answers 中查找有关 Financial Toolbox 的更多信息

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.1.0.0

html help file is updated

1.0.0.0