欢迎光临散文网 会员登陆 & 注册

【Python 编程】2D 随机游走 2D Random Walk

2021-09-14 12:36 作者:AoiSTZ23  | 我要投稿

By: Tao Steven Zheng (郑涛)

A random walk is a stochastic process that describes a path that consists of a succession of random steps on some mathematical space such as the integers. The following Python code generates three 2-dimensional random walks and plots them.

随机游动(random walk)是一种随机过程(stochastic process),它描述了在某些数学空间(如整数)上由一系列随机步骤组成的随机游动。以下的 Python 代码生成三个二维随机游动并绘制它们。


Results 

Looks like Brownian motion!
看上去像布朗运动!


Animate the 2D random walk



【Python 编程】2D 随机游走 2D Random Walk的评论 (共 条)

分享到微博请遵守国家法律