Gaussian distributed random numbers
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Youssef Khmou
am 7 Mär. 2013
Bearbeitet: Youssef Khmou
am 7 Mär. 2013
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');
Akzeptierte Antwort
Youssef Khmou
am 7 Mär. 2013
Bearbeitet: Youssef Khmou
am 7 Mär. 2013
hi Arathi,
try :
N=(1/sqrt(2))*(randn(4,2)+j*randn(4,2));
M=mean(N(:))
S=std(N(:))
V=var(N(:))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Random Number Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!