matlab twister,Mersenne-Twister

Mersenne-Twister

所属分类:matlab例程

开发工具:matlab

文件大小:565KB

下载次数:55

上传日期:2012-07-22 21:51:55

上 传 者:lijun

说明:  利用Mersenne Twister算法产生随机数,并测试和分析了其随机性。 程序中还加入了界面显示。

各个文件为:

initGenerator.m:

initGenerator函数,用于初始化随机序列的长度和值

generateNum.m:

generateNum函数,当index为0时被调用,用于创建624维的移位寄存器数组

extractNum.m:

extractNum函数,根据index当前值选择数组中的数生成随机数,同时改变index的值。

main.m:

main主函数,输入种子seed和产生数目total,输出产生结果及随机性测试结果

mymy.m和mymy.fig:

用于界面显示的部分,这两个文件会通过界面传入seed和total的值,并调用main函数,在相应的框中显示输出结果。

(According to the algorithm principle on Wikipedia, the Mersenne Twister algorithm to generate random numbers, and test and analysis of its randomness. The program has also joined the interface display.

The individual files are:

initGenerator.m:

initGenerator function used to initialize the random sequence length and value

generateNum.m:

generateNum function is invoked when the index is zero, and used to create a 624-dimensional shift register array

extractNum.m:

extractNum function, according to index the current value to select the number to generate random numbers, and change the value of the index in the array.

main.m:

main function of the input seed to seed and produce the number of total, the output generated results and the randomness of the test results

mymy.m and mymy.fig:

Part of these two files for interface display interface incoming seed and the total value of, and calls the main function, to display the output in the appropriate boxes.)

文件列表:[举报垃圾]

Mersenne Twister

................\2009211125_09210682_19_李俊.docx,605533,2012-06-16

................\Mersenne Twister

................\................\extractNum.m,347,2012-06-15

................\................\generateNum.m,457,2012-06-15

................\................\initGenerator.m,245,2012-06-15

................\................\main.m,911,2012-06-16

................\................\mymy.fig,4933,2012-06-16

................\................\mymy.m,9591,2012-06-16

................\官网代码

................\........\mt19937-2 (1).c,4687,2012-06-10

................\........\mt19937-2.c,4687,2012-06-10

近期下载者:

相关文件:

收藏者:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值