How to generate data with a specific distribution
조회 수: 6 (최근 30일)
이전 댓글 표시
Matlab provides random number generating from a uniform distribution (rand). Is there a way to generate data from other distributions that Matlab supports like Chi-Square??
Sajad
댓글 수: 1
PRIYANKA upadhyay
2013년 7월 3일
hello, u have write here that Matlab provides random number generating from a uniform distribution (rand)....can u pls tell exactly how can i generate random nos...
답변 (2개)
Laura Proctor
2011년 7월 8일
Use the random function. Here's an example of creating a 10x3 matrix of random numbers using a Chi-Square distribution with 2 degrees of freedom:
y = random('chi2',2,10,3)
댓글 수: 0
Oleg Komarov
2011년 7월 8일
Otherwise to get a chi-squared just generate standard normals and sum their squares: http://en.wikipedia.org/wiki/Chi-square_distribution
댓글 수: 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!