WWEIBPLOT Plots data on a Weibull distribution paper CALL: phat = wweibplot(X) phat = [a c] Parameters (see wweibcdf) estimated from the plot by least squares method X = data vector or matrix Example: R=wweibrnd(2,2,1,100); phat=wweibplot(R) See also wwibcdf, wweibinv
Computes and plots the empirical CDF | |
Hold current graph. | |
Linear plot. | |
Graph title. | |
X-axis label. | |
Y-axis label. |
% CHAPTER5 contains the commands used in Chapter 5 of the tutorial | |
Parameter estimates for DIST2D data. |
001 function phat = wweibplot(x) 002 %WWEIBPLOT Plots data on a Weibull distribution paper 003 % 004 % CALL: phat = wweibplot(X) 005 % 006 % phat = [a c] Parameters (see wweibcdf) estimated from 007 % the plot by least squares method 008 % X = data vector or matrix 009 % 010 % Example: 011 % R=wweibrnd(2,2,1,100); 012 % phat=wweibplot(R) 013 % 014 % See also wwibcdf, wweibinv 015 016 017 018 % Reference: Cohen & Whittle, (1988) "Parameter Estimation in Reliability 019 % and Life Span Models", p. 25 ff, Marcel Dekker. 020 021 % Revised jr 28.08.2000: line 23 added. 022 % rewritten ms 20.06.2000 023 024 x = x(:); 025 F=empdistr(x,[],0); 026 plot(log(F(:,1)),log(-log(1-F(:,2))),'b.','markersize',12); 027 U=[ones(size(x)) log(F(:,1))]; 028 b=U\log(-log(1-F(:,2))); 029 c=b(2); 030 a=exp(-b(1)/c); 031 hold on 032 plot(log(F(:,1)),U*b,'r--') 033 hold off 034 title('Weibull Probability Plot') 035 xlabel('log(X)') 036 ylabel('log(-log(1-F))') 037 if nargout > 0, 038 phat=[a,c]; 039 end 040
Comments or corrections to the WAFO group