Generate 2-dimensional normal-distribution

2 ビュー (過去 30 日間)
Kristoffer Linder
Kristoffer Linder 2018 年 10 月 24 日
編集済み: Matt J 2018 年 10 月 24 日
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);
  1 件のコメント
Kristoffer Linder
Kristoffer Linder 2018 年 10 月 24 日
First solution follow the theory from the prevous question. Thanks!!!

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2018a

Translated by