How can I create a random array from a distribution?
4 次查看(过去 30 天)
显示 更早的评论
I was wondering how can I create an array of certain dimensions (i.e. 1000x1) from a distribution object?
0 个评论
采纳的回答
the cyclist
2015-10-23
N = 1000;
pd = makedist('Normal','mu',75,'sigma',10);
r = pd.random(N,1);
4 个评论
the cyclist
2015-10-23
I'm not sure exactly what you mean. A truncated normal is not a normal. Maybe you need something like a beta distribution, where you can choose parameters that make it symmetric, but it has a finite range?
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!