Gaussian distributed random numbers

9 ビュー (過去 30 日間)
Arathi P
Arathi P 2013 年 3 月 7 日
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
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
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(:))
  1 件のコメント
Arathi P
Arathi P 2013 年 3 月 21 日
thank you sir

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRandom Number Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by