91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

學習復雜網絡時,設計到冪律分布問題,計算冪律分布的有效代碼,可運行

資源截圖

代碼片段和文件信息

function?x?=?randp(NMalphab)
%?randp?generates?Pareto?random?variables.
%
%?created:? Fri?Aug??8?1997?(c)?Matthew?Roughan
%?author:?? Matthew?Roughan?
%?email:??? matthew.roughan@adelaide.edu.au
%
%?This?function?generates?Pareto?random?variables?(of?type?I)
%????see?“Statistical?Distributions“?Evans?Hastings?and?Peacock?Wiley?1993
%????or??http://www.maths.adelaide.edu.au/matthew.roughan/probability_distrns/node6.html
%????or??http://en.wikipedia.org/wiki/Pareto_distribution
%
%?The?Pareto?distribution?is?a?classic?“heavy-tailed“?or?“power-law“?distribution.
%?It?has?distribution?function
%????F(x)?=?1?-?(b/x)^alpha?for?x>=b
%?and?density
%????f(x)?=?(alpha/b)?*?(b/x)^(alpha+1)?for?x>=b
%
%?Its?mean?is
%????E[X]?=?b?*?alpha/(alpha-1)?for?alpha>1
%?but?note?that?the?mean?is?infinite?for?alpha<=1
%
%?Its?variance?is?
%????Var(X)?=?b^2?*?alpha/[(alpha-1)^2*(alpha-2)]?for?alpha>1
%?but?note?that?the?variance?is?infinite?for?alpha<=2
%
%?Median
%????Med(X)?=?b?*?2^(1/alpha)
%
%?INPUTS:
%????(NM)?????size?of?output?matrix?of?random?variables
%????alpha>0???shape?parameter?of?Pareto?distribution
%????b>0???????location?(sometimes?called?scale)?parameter?of?Pareto?distribution
%?
%?OUTPUTS
%????x?????????an?(NM)?array?of?random?Pareto?distributed?numbers
%?????????????????range?of?x?=?[b?inf)
%?
%?Note?the?function?calls?“rand“?so?if?you?want?to?control?the?seed?use?rand(‘state‘?seed).
%
%?Note?that?the?type?II?Pareto?is?just?shifted?so?that?x>=0?so?to?obtain?this?distribution
%?just?take
%?????????????x?=?randp(NMalphab)?-?b;
%

if?(alpha?<=?0)
??error(‘alpha?must?be?>?0‘)
end
if?(b?<=?0)
??error(‘b?must?be?>?0‘)
end
if?(N<1?|?ceil(N)?~=?N)
??error(‘N?must?be?a?positive?integer‘)
end
if?(M<1?|?ceil(M)?~=?M)
??error(‘M?must?be?a?positive?integer‘)
end

y?=?rand(NM);
x?=?b*(1-y).^(-1/alpha);


?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????1336??2009-08-02?21:56??power-law冪律分布\license.txt

?????文件???????1838??2009-08-02?21:21??power-law冪律分布\randp.m

?????文件????????977??2009-08-02?21:48??power-law冪律分布\randp_test.m

?????文件???????8042??2009-08-02?21:48??power-law冪律分布\randp_test.png

?????文件??????10398??2014-05-01?20:51??power-law冪律分布\randp_test.tiff

?????目錄??????????0??2014-05-01?20:53??power-law冪律分布

-----------?---------??----------?-----??----

????????????????22591????????????????????6


評論

共有 條評論