摘要
Python Code
from matplotlib.pyplot import *
from numpy import linspace, exp
def calc_frechet_pdf(x,a,s):
y = (a/s) * ((x/s)**(-1-a)) * exp(- (x/s)**(-a) )
return y
x = linspace(0,4,10**5)
fig = figure()
ax = fig.add_subplot(111)
ax.plot(x,calc_frechet_pdf(x,1.,1.),label=r'$\alpha=1;$ $s=1$', linewidth=2)
ax.plot(x,calc_frechet_pdf(x,2.,1.),label=r'$\alpha=2;$ $s=1$', linewidth=2)
ax.plot(x,calc_frechet_pdf(x,3.,1.),label=r'$\alpha=3;$ $s=1$', linewidth=2)
ax.plot(x,calc_frechet_pdf(x,1.,2.),label=r'$\alpha=1;$ $s=2$', linewidth=2)
ax.plot(x,calc_frechet_pdf(x,2.,2.),label=r'$\alpha=2;$ $s=2$', linewidth=2)
ax.plot(x,calc_frechet_pdf(x,3.,2.),label=r'$\alpha=3;$ $s=2$', linewidth=2)
ax.grid(True)
ax.minorticks_on()
ax.legend(loc=1)
ax.set_xlim(0,4)
ax.set_ylim(0,1.5)
ax.set_xlabel("x")
ax.set_ylabel("PDF")
fig.savefig("Frechet_pdf.svg",bbox_inches="tight", pad_inches=.15)
许可协议
我,本作品著作权人,特此采用以下许可协议发表本作品:
|
已授权您依据自由软件基金会发行的无固定段落及封面封底文字(Invariant Sections, Front-Cover Texts, and Back-Cover Texts)的GNU自由文件许可协议1.2版或任意后续版本的条款,复制、传播和/或修改本文件。该协议的副本请见“GNU Free Documentation License”。http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue
|
- 您可以自由地:
- 共享 – 复制、发行并传播本作品
- 修改 – 改编作品
- 惟须遵守下列条件:
- 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
- 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。
https://creativecommons.org/licenses/by-sa/4.0CC BY-SA 4.0 Creative Commons Attribution-Share Alike 4.0 truetrue
添加一行文字以描述该文件所表现的内容