How can I set a variable 0.3 > x > 0.5 for use in calculating a CDF from a PDF?

1 回表示 (過去 30 日間)
Camden Wallraff
Camden Wallraff 2016 年 2 月 4 日
編集済み: Chibuzo Nnonyelu 2016 年 2 月 4 日
I was using gampdf(x,k,th) with values of x = (0.2:0.001:0.6) k = 64 th = 160 and I get a gamma model graph that looks opposite of what it should compared to wikipedia, at which point I code: x = (0.3:0.5) and set gamcdf(x,k,th)
Help!

回答 (1 件)

Chibuzo Nnonyelu
Chibuzo Nnonyelu 2016 年 2 月 4 日
編集済み: Chibuzo Nnonyelu 2016 年 2 月 4 日
x = (0.3:0.5) would return only 0.3 because by default, the step is 1. To get numbers between the two values, use
x = 0.3:0.01:0.5;
However, your mathematical expression says entirely different thing. It say numbers below 0.3 and above 0.5. You need a lowerbound and an upperbound.

カテゴリ

Help Center および File ExchangeGamma Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by