create random number with gaussian distribution
1 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Birdman
2018-2-18
For one single number, use
R = normrnd(0,1)
for an 1x10 array:
R = normrnd(0,1,[1 10])
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Random Number Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!