WRAYLPLOT Plots data on a Rayleigh distribution paper CALL: bhat = wraylplot(X) bhat = Parameter of the distribution estimated from the plot by least squares method. X = data Example: R=wraylrnd(1,1,100); wraylplot(R); See also wqqplot
Computes and plots the empirical CDF | |
Hold current graph. | |
Linear plot. | |
Graph title. | |
X-axis label. | |
Y-axis label. |
Parameter estimates for DIST2D data. |
001 function bhat = wraylplot(x) 002 %WRAYLPLOT Plots data on a Rayleigh distribution paper 003 % 004 % CALL: bhat = wraylplot(X) 005 % 006 % bhat = Parameter of the distribution estimated from the 007 % plot by least squares method. 008 % X = data 009 % 010 % Example: 011 % R=wraylrnd(1,1,100); 012 % wraylplot(R); 013 % 014 % See also wqqplot 015 016 % Reference: Cohen & Whittle, (1988) "Parameter Estimation in Reliability 017 % and Life Span Models", p. 181 ff, Marcel Dekker. 018 019 %tested on: matlab 5.1 020 % rewritten ms 15.06.2000 021 022 F=empdistr(x,[],0); 023 plot(F(:,1),sqrt(-log(1-F(:,2))),'b.','markersize',12) 024 U=[ones(size(F(:,1))) F(:,1)]; 025 c=U\sqrt(-log(1-F(:,2))); 026 b=1/c(2)/2^(1/2); 027 hold on 028 plot(F(:,1),U*c,'r--') 029 hold off 030 title('Rayleigh Probability Plot') 031 xlabel('X') 032 ylabel('(-log(1-F))^{1/2}') 033 if nargout > 0, 034 bhat=b; 035 end 036
Comments or corrections to the WAFO group