필터 지우기
필터 지우기

Getting power law random numbers and plotting its histogram

조회 수: 2 (최근 30일)
Dhanuja Elizabeth Thomas
Dhanuja Elizabeth Thomas 2016년 8월 18일
댓글: Torsten 2016년 8월 19일
I'm using k = rand and power_law = (1-k)^(1/(-alpha+1)) (where alpha = 1.5) for getting the random numbers from power law distribution.
I think I should get a power law distributed histogram when I'm using hist function on the generated power law random numbers, that is,
[f,x] = hist(power_law,100)
N = f/sum(f)
bar(x,N)
But I'm not sure if I'm following a correct way, Kindly help me to solve this issue.
  댓글 수: 1
Torsten
Torsten 2016년 8월 19일
You only generate a single random number. How can you expect to get a histogram out of it ?
Best wishes
Torsten.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by