Gaussian distributed random numbers
조회 수: 2 (최근 30일)
이전 댓글 표시
Sir, I need to create a 4*2 matrix in which all the elements are independent identically distributed(i.i.d) complex gaussian variables with zero mean and unit variance.how do i create it? Using randn function, mean zero and variance one will be obtained only for larger number of sets, but not for 8 values.
댓글 수: 1
Youssef Khmou
2013년 3월 7일
편집: Youssef Khmou
2013년 3월 7일
hi, its fine, m/sigma/variance are also Random variables , try :
for n=3:1:100
N=(1/sqrt(2))*(randn(n,n-2)+j*randn(n,n-2));
M(n)=mean(N(:));
S(n)=std(N(:));
V(n)=var(N(:));
end
figure, plot(real(M)), xlabel(' Samples'),title(' Mean');
figure, plot(V), xlabel(' Samples'),title(' Variance');
채택된 답변
Youssef Khmou
2013년 3월 7일
편집: Youssef Khmou
2013년 3월 7일
hi Arathi,
try :
N=(1/sqrt(2))*(randn(4,2)+j*randn(4,2));
M=mean(N(:))
S=std(N(:))
V=var(N(:))
추가 답변 (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!