登录
首页 » 算法 » 程序只产生均值为0,方差为1的随机数,要产生均值为E,方差为D的随机数,只要随机数*D+E就可以了。高斯随机数程序还是带参数的,参数是用来描述正态分布的一个浮点...

程序只产生均值为0,方差为1的随机数,要产生均值为E,方差为D的随机数,只要随机数*D+E就可以了。高斯随机数程序还是带参数的,参数是用来描述正态分布的一个浮点...

于 2023-08-17 发布 文件大小:1.86 kB
0 156
下载积分: 2 下载次数: 1

代码说明:

程序只产生均值为0,方差为1的随机数,要产生均值为E,方差为D的随机数,只要随机数*D+E就可以了。高斯随机数程序还是带参数的,参数是用来描述正态分布的一个浮点数表。在执行程序时,先生成这个表(只做一次),而后就可以任意多次地执行高斯随机数产生程序了。使用C是为了保证通用性,如果有人觉得麻烦,可以用C++做个类,把这些东西都封装进去。另外,如果有人有兴趣,也可以把它修改成任意形式分布的连续随机数产生程序,修改非常简单,这里就不提示了。-procedures have only mean of 0 and variance for a random number to produce the mean E, D variance for the random number, as long as a few random E* D on it. Gaussian random process parameters or with the parameter is used to describe a normal distribution of the float table. In the implementation process, Mr. into the table (one-off), and you can repeatedly arbitrary implementation Gaussian random number generator proceedings. The use of C is to ensure commonality, if someone finds trouble, can be used to be a Class C, all these things into account Packaging. Also, if someone is interested, can you change the form of arbitrary distribution of continuous random number generator procedure is very simple changes, I will not be sacrificed as a result.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 贪吃蛇matlab程序
    用matlab描写贪吃蛇的程序,简单易学,可以在此基础上,丰富贪吃蛇的长度,在转弯处还可以做文章
    2022-01-23 10:31:35下载
    积分:1
  • 机器学习,K-mean,python写的,还有测试数据
    本算法是利用K-mean算法(机器学习十大算法),对平面上的二维数据点进行聚类的算法,该算法可以运用在图像,和语音上。
    2022-05-24 16:25:08下载
    积分:1
  • 这是一个差异与Bezier曲线、B
    这是一个分别用Bezier曲线和B样条曲线进行曲线拟合的例子 程序用VB6.0中文版编写 例子中需要一个窗体和一个按钮(使用默认的名字) 在本例中,黑色的线条是对坐标系上各点的直接连线 黄色的线仅对点间连线进行近似拟合,并不通过每一个点,使用的是B样条曲线 蓝色的线通过除第一个点和最后一个点之外的每一个点,使用的是Bezier曲线-This is a difference with Bezier curves and B-spline curves curve fitting example of the procedures used to prepare the Chinese version VB6.0 need an example of the form and a button (use the default name), in this case, the black lines of the coordinates of the point on the direct connection of the yellow line between the only point Approximate line fitting, does not pass through every point, the use of B-spline curve through the blue line in addition to a final point and a point outside of each one, using a Bezier curve
    2023-04-18 07:40:03下载
    积分:1
  • 维纳仿镇ar模型
    维纳仿镇ar模型-Wiener imitation model town ar
    2022-05-31 07:21:56下载
    积分:1
  • 按照既定的步长,输入后筛选已有数据 程序1
    按照既定的步长,输入后筛选已有数据 程序1-accordance with the established step, the imported data screening procedures have a
    2022-02-12 08:34:52下载
    积分:1
  • 音乐识别
    音高的提取,实现音乐的音高提取,在用语言将一首音乐里的音乐特性提取出来。
    2022-12-28 23:10:03下载
    积分:1
  • 一个显示水波型曲面的工程,需要glut
    一个显示水波型曲面的工程,需要glut -show a wave-surface project requires glut
    2023-06-04 10:55:02下载
    积分:1
  • 数学网络编程
    您想要了解的就是我的代码,但您必须尝试所有的代码你在你的电脑请尝试自己之前的比赛用我的代码谢谢
    2022-04-11 22:31:01下载
    积分:1
  • 简单的讲,所谓拟合是指已知某函数的若干离散函数值{f1,f2,…,fn},通过调整该函数中若干待定系数f(λ1, λ2,…,λ3), 使得该函数与已知点集的差别...
    简单的讲,所谓拟合是指已知某函数的若干离散函数值{f1,f2,…,fn},通过调整该函数中若干待定系数f(λ1, λ2,…,λ3), 使得该函数与已知点集的差别(最小二乘意义)最小。如果待定函数是线性,就叫线性拟合或者线性回归(主要在统计中),否则叫作非线性拟合或者非线性回归。表达式也可以是分段函数,这种情况下叫作样条拟合。-Simply speaking, the so-called fitting refers to a function known to a number of discrete function values (f1, f2, ..., fn), by adjusting the number of undetermined coefficient function f (λ1, λ2, ..., λ3), makes the function and known points of difference (least squares significance) the smallest. To be determined if the function is linear, is called linear regression or linear regression (mainly in the statistics), otherwise known as non-linear fitting, or nonlinear regression. Expressions can also be a sub-function, this case is called spline fitting.
    2022-02-03 20:04:37下载
    积分:1
  • OPENCV手势轮廓绘制使用
    资源描述基于opencv的手势识别的前期处理,,运行环境是VS2013,opencv2.4.9,通过修改链接器可以自行修改运行环境。代码直接debug编译可以使用,该代码是应用于轮廓的绘制。基于opencv的手势识别前期必须对图像进行一系列的处理,这是其中的一种,有了轮廓之后再去判定tips数。
    2023-02-27 02:10:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载