fun1= normrnd(20,sqrt(0.6),[400 400]); fun1 = 20 + sqrt(0.6)*randn(400); in above function 20 is mean and 0.6 is a variance; fun1 should generate 20 mean and 0.6 variance matrix of 400*400 . but i got 20 mean and variance is 0.0018,,,so what is prob
15 ビュー (過去 30 日間)
古いコメントを表示
fun1= normrnd(20,sqrt(0.6),[400 400]); fun1 = 20 + sqrt(0.6)*randn(400);
in above function 20 is mean and 0.6 is a variance; fun1 should generate 20 mean and 0.6 variance matrix of 400*400 . but i got 20 mean and variance is 0.0018,,,so what is problem for improper variance
0 件のコメント
採用された回答
Wayne King
2012 年 12 月 24 日
編集済み: Wayne King
2012 年 12 月 24 日
X = normrnd(20,sqrt(0.6),400,400);
meanz = mean(X);
varz = var(X);
I get approximately 20 as the mean of every column and 0.6 as the variance of every column
You cannot calculate the variance by
var(var(X))
because the variance of the variances will not vary much! As expected
But not that
mean(X(:))
and
var(X(:))
give you the expected results
3 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Beamforming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!