フィルターのクリア

create random number with gaussian distribution

1 回表示 (過去 30 日間)
evangeline
evangeline 2018 年 2 月 18 日
回答済み: Birdman 2018 年 2 月 18 日
I need to create a random number with gaussian distribution and with average value of 0 and var of 1. like N(0,1). and also a N(0,10). how can i do this with matlab?

採用された回答

Birdman
Birdman 2018 年 2 月 18 日
For one single number, use
R = normrnd(0,1)
for an 1x10 array:
R = normrnd(0,1,[1 10])

その他の回答 (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