Generate 2-dimensional normal-distribution

10 次查看(过去 30 天)
I want to generate 36 observations from a 2-dimensional normal distribution using the covariance matrix
C = [1 0.8;0.8 1];
Anyone know how to do this?

采纳的回答

Matt J
Matt J 2018-10-24
编辑:Matt J 2018-10-24
observations=randn(36,2)*sqrtm(C);
or,
observations=mvnrnd(zeros(36,2),C);

更多回答(0 个)

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by