r****y 发帖数: 1437 | 1 【 以下文字转载自 Mathematics 讨论区 】
发信人: rossby (五十岚已夜), 信区: Mathematics
标 题: a question about random number generator
发信站: BBS 未名空间站 (Thu Feb 7 11:28:25 2008), 转信
e.g., given a covariance matrix
cov = [ 1 0.02
0.02 1]
how to generate two random number series that have such covariance?
let's make it more specific, two random numbers both follow normal
distribution.
I guess there must be an algorithm invented already by someone for
such thing.
| s**b 发帖数: 169 | 2 not my major, just curious,
covariance only can determine PDF?
【在 r****y 的大作中提到】 : 【 以下文字转载自 Mathematics 讨论区 】 : 发信人: rossby (五十岚已夜), 信区: Mathematics : 标 题: a question about random number generator : 发信站: BBS 未名空间站 (Thu Feb 7 11:28:25 2008), 转信 : e.g., given a covariance matrix : cov = [ 1 0.02 : 0.02 1] : how to generate two random number series that have such covariance? : let's make it more specific, two random numbers both follow normal : distribution.
| l***n 发帖数: 812 | 3 在Matlab里直接使用就好了
mvnrnd(MU,SIGMA,N)
如果你想看它的程序怎么遍的,可以去查看它的源程序
【在 r****y 的大作中提到】 : 【 以下文字转载自 Mathematics 讨论区 】 : 发信人: rossby (五十岚已夜), 信区: Mathematics : 标 题: a question about random number generator : 发信站: BBS 未名空间站 (Thu Feb 7 11:28:25 2008), 转信 : e.g., given a covariance matrix : cov = [ 1 0.02 : 0.02 1] : how to generate two random number series that have such covariance? : let's make it more specific, two random numbers both follow normal : distribution.
|
|