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!