Gaussian distribution for 2D points

I want to generate well distributed 100 points using gaussian distribution in a 100x100 region having seperate variances in x-axis and y-axis () (something similar to attachment). I have tried the following code, however, all the points are clustered around (50,50). Any help will be appreciated. TIA
m = 50; %Mean
v = 30; %Variance
d = 300; %Length
z = m + sqrt(v)*randn(d,2);

1 件のコメント

darova
darova 2019 年 9 月 26 日
Where is X coordinate?

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

回答 (1 件)

the cyclist
the cyclist 2019 年 9 月 26 日

0 投票

If you increase the value of v (the variance), you will get more widely dispersed points.

カテゴリ

ヘルプ センター および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

質問済み:

2019 年 9 月 26 日

回答済み:

2019 年 9 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by