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일

0 개 추천

observations=randn(36,2)*sqrtm(C);
or,
observations=mvnrnd(zeros(36,2),C);

댓글 수: 1

First solution follow the theory from the prevous question. Thanks!!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품

릴리스

R2018a

질문:

2018년 10월 24일

편집:

2018년 10월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by