フィルターのクリア

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 Center および File ExchangeHistograms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by