How could i generate 10000 samples of a random variable uniformly distributred in(0,1)??
이전 댓글 표시
Dear Sir/Madam, How could i generate 10000 samples of a random variable uniformly distributred in(0,1)??
댓글 수: 4
Purushottama Rao
2015년 8월 19일
편집: Purushottama Rao
2015년 8월 19일
Are you lookig for somethinglike
rand(10000,1)
HARI PRASAD
2015년 8월 19일
Walter Roberson
2015년 8월 19일
Yes.
HARI PRASAD
2015년 8월 19일
답변 (1개)
Purushottama Rao
2015년 8월 19일
편집: Purushottama Rao
2015년 8월 19일
In your code,loop should start form 1. i=1:1:1000
However inorder to acheieve what you have wanted, you may not need a loop.
X= rand(1,10000);
Y=rand(1,10000);
k=sqrt(X.^2+Y.^2)
k is the result
카테고리
도움말 센터 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!