www.gusucode.com > stats 源码程序 matlab案例代码 > stats/BurrpdfforVariousParametersExample.m
%% Burr pdf for Various Parameters % This example shows how to create a variety of shapes for probability density % functions of the Burr distribution. %% X = 0:0.01:5; c = [0.5 0.95 2 5]; k = [0.5 0.75 2 5]; alpha = [0.5 1 2 5]; colors = ['b';'g';'r';'k']'; figure for i = 1:1:4 pdf1(i,:) = pdf('burr',X,1,c(i),0.5); pdf2(i,:) = pdf('burr',X,1,2,k(i)); pdf3(i,:) = pdf('burr',X,alpha(i),2,0.5); axC = subplot(3,1,1); pC(i) = plot(X,pdf1(i,:),colors(i),'LineWidth',2); title('Effect of c, \alpha = 1, k = 0.5'),xlabel('x') hold on axK = subplot(3,1,2); pK(i) = plot(X,pdf2(i,:),colors(i),'LineWidth',2); title('Effect of k, \alpha = 1, c = 2'),xlabel('x') hold on axAlpha = subplot(3,1,3); pAlpha(i) = plot(X,pdf3(i,:),colors(i),'LineWidth',2); title('Effect of \alpha, c = 2, k = 0.5'),xlabel('x') hold on end set(axC,'XLim',[0 3],'YLim',[0 1.2]); set(axK,'XLim',[0 3],'YLim',[0 2.1]); set(axAlpha,'XLim',[0 5],'YLim',[0 1]); legend(axC,'c=0.5','c=0.95','c=2','c=5'); legend(axK,'k=0.5','k=0.75','k=2','k=5'); legend(axAlpha,'\alpha=0.5','\alpha=1','\alpha=2','\alpha=5'); %% % This figure illustrates how the shape and scale of the Burr distribution % changes for different values of its parameters.