韦布尔分布 matlab,MATLAB绘制威布尔分布曲线

41528d3028836879cd698677c3999917.gifMATLAB绘制威布尔分布曲线

MATLAB绘制威布尔分布曲线 威布尔分布概率密度函数: 威布尔分布概率分布函数: 其中m>0,是尺度参数也叫比例参数,a>0是形状参数。 X是随机变量,是未知参数,表示时间延滞。 图1:设定尺度参数m值为1,取五个形状参数a,自变量x 代码如下: m=[1 1 1 1 1,2]; a=[0.5 1 1.5 2.5 5,5]; x=linspace(0,5); linecolor=[ r , b , g , k , y ]; for n=1:5 y1=m(n)*a(n)*((m(n)*x).^(a(n)-1)).*(exp(-(m(n)*x).^a(n))); y=1-exp(-(m(n)*x).^a(n)); subplot(1,2,2) title( 图1:概率分布函数 ); plot(x,y); hold on; subplot(1,2,1) type=linecolor(n); title( 图1:概率密度函数 ); plot(x,y1,type); hold on; legend( m=1,a=0.5 , m=1,a=1 , m=1,a=1.5 , m=1,a=2.5 , m=1,a=5 ); end 图2:设定形状参数a值为2,取五个尺度参数m,自变量x 代码如下: m=[0.5 0.75 1 1.5 1.75,2]; a=[2 2 2 2 2.5]; x=linspace(0,5); linecolor=[ r , y , b , g , k ]; for n=1:5 y1=m(n)*a(n)*((m(n)*x).^(a(n)-1)).*(exp(-(m(n)*x).^a(n))); y=1-exp(-(m(n)*x).^a(n)); subplot(1,2,2) title( 图2:概率分布函数 ); plot(x,y); hold on; subplot(1,2,1) type=linecolor(n); title( 图2:概率密度函数 ); plot(x,y1,type); hold on; legend( m=0.5,a=2 , m=0.75,a=2 , m=1,a=2 , m=1.5,a=2 , m=1.75,a=2 ); end 图3:设定尺度参数m值为1,自变量为x,a的三维概率分布图 代码如下: m=1; [x,a]=meshgrid(0:0.05:4,0:0.05:5); fx=m.*a.*(m.*x).^(a-1).*(exp(-(m.*x).^a)); Fx=1-exp(-(m.*x).^a); subplot(1,2,1) mesh(x,a,fx); title( 图3:m=1,a,x三维概率密度分布 ); subplot(1,2,2) mesh(x,a,Fx); title( 图3:m=1,a,x三维概率分布图 ); 图4:设定形状参数a值为2,自变量为x,m的三维概率分布图 代码如下: a=2; [x,m]=meshgrid(0:0.05:5,0:0.05:2); fx=m.*a.*(m.*x).^(a-1).*(exp(-(m.*x).^a)); Fx=1-exp(-(m.*x).^a); subplot(1,2,1) mesh(x,m,fx); title( 图4:a=2,m,三维概率密度分布 ); subplot(1,2,2) mesh(x,m,Fx); title( 图4:a=2,m,x三维概率分布图 );

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值