请问在fortran中如何生成(0~1)之间的随机数?
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/12 02:20:18
请问在fortran中如何生成(0~1)之间的随机数?
最好是生成一个数组L(1:1000),其中随机50个元素为1,其它都为0,
最好是生成一个数组L(1:1000),其中随机50个元素为1,其它都为0,
SEED
Run-Time Subroutine:Changes the starting point of the pseudorandom number generator.
Module:USE DFLIB
Syntax
CALL SEED (iseed)
iseed
(Input) INTEGER(4).Starting point for RANDOM.
SEED uses iseed to establish the starting point of the pseudorandom number generator.A given seed always produces the same sequence of values from RANDOM.
If SEED is not called before the first call to RANDOM,RANDOM always begins with a seed value of one.If a program must have a different pseudorandom sequence each time it runs,pass the constant RND$TIMESEED (defined in DFLIB.F90 in the \DF98\INCLUDE subdirectory) to the SEED routine before the first call to RANDOM.
Run-Time Subroutine:Changes the starting point of the pseudorandom number generator.
Module:USE DFLIB
Syntax
CALL SEED (iseed)
iseed
(Input) INTEGER(4).Starting point for RANDOM.
SEED uses iseed to establish the starting point of the pseudorandom number generator.A given seed always produces the same sequence of values from RANDOM.
If SEED is not called before the first call to RANDOM,RANDOM always begins with a seed value of one.If a program must have a different pseudorandom sequence each time it runs,pass the constant RND$TIMESEED (defined in DFLIB.F90 in the \DF98\INCLUDE subdirectory) to the SEED routine before the first call to RANDOM.
如何在excel中生成随机函数,比如要生成区间(-200,+200)之间的随机数
如何使用EXCEL表在5*5的矩阵中随机生成1-25之间的随机数 不重复
c++生成随机数我想要生成一个随机数,他的范围在0~180或者225~360之间,这种数值范围有两段的随机数该如何产生呢
用vb如何生成0-100之间的随机数
fortran中设置随机数的问题
请问Matlab中如何产生一个介于-1到1之间的随机数?
关于随机数生成的问题:如何生成一个符合高斯分布,范围从0-1之间的随机数列?
vb中如何生成不同的随机数
如何在excel中生成平均值为2的一组(5个)随机数
matlab如何生成一串随机数,使之均值为0.7且范围在0到1之间
matlab如何生成2.4到2.5之间的随机数
c语言中如何生成1个0到1的随机数