how to generate a vector of uncorrelated random varaibles
7 次查看(过去 30 天)
显示 更早的评论
Hi all, I like to generate a vector of uncorrelated random variables in matlab? is anyone have some suggestion to me? Thanks
0 个评论
采纳的回答
Oleg Komarov
2012-2-6
Any distribution centered on 0 will yield uncorrelated vectors as long as you have enough observations:
v = rand(1e5,2);
corr(v)
2 个评论
Tom Lane
2012-2-6
Most MATLAB random number generators (rand, randn, others) will generate arrays in which the columns are theoretically uncorrelated. That is, any sample correlation between them is just random. Only a few functions (mvnrnd) generate data with theoretical correlation.
If you need exactly zero sample correlation, then you'll probably have to impose that yourself. That will make the samples no longer independent, though.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Random Number Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!