WGUMBPLOT Plots data on a Gumbel distribution paper. CALL: phat = wgumbplot(X) phat = [a b] Parameters (see wgumbcdf) estimated from the plot by least squares method X = data vector or matrix Example: R=wgumbrnd(2,0,[],1,100); phat=wgumbplot(R)
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 = wgumbplot(x) 002 %WGUMBPLOT Plots data on a Gumbel distribution paper. 003 % 004 % CALL: phat = wgumbplot(X) 005 % 006 % phat = [a b] Parameters (see wgumbcdf) estimated from the plot by 007 % least squares method 008 % X = data vector or matrix 009 % 010 % Example: 011 % R=wgumbrnd(2,0,[],1,100); 012 % phat=wgumbplot(R) 013 014 % Reference: 015 % Johnson N.L., Kotz S. and Balakrishnan, N. (1994) 016 % Continuous Univariate Distributions, Volume 2. Wiley. 017 018 019 % rewritten ms 20.06.2000 020 021 F=empdistr(x,[],0); 022 plot(F(:,1),-log(-log(F(:,2))),'b.','markersize',12); 023 U=[ones(size(F(:,1))) F(:,1)]; 024 c=U\(-log(-log(F(:,2)))); 025 a=1/c(2); 026 b=-c(1)*a; 027 hold on 028 plot(F(:,1),U*c,'r--') 029 hold off 030 title('Gumbel Probability Plot') 031 xlabel('X') 032 ylabel('-log(-log(F))') 033 if nargout > 0, 034 phat=[a,b]; 035 end 036
Comments or corrections to the WAFO group