WEXPPLOT Plots data on a Exponential distribution paper CALL: phat = wexpplot(X) phat = [m] Parameter (see wexpcdf) estimated from the plot by least squares method X = data vector or matrix Example: R=wexprnd(2,1,100); phat=wexpplot(R) See also wexpcdf, wweibplot
Computes and plots the empirical CDF | |
Hold current graph. | |
Average or mean value. | |
Convert number to string. (Fast version) | |
Linear plot. | |
Graph title. | |
X-axis label. | |
Y-axis label. |
Extrapolates a sequence of turning points. |
01 function phat = wexpplot(x) 02 %WEXPPLOT Plots data on a Exponential distribution paper 03 % 04 % CALL: phat = wexpplot(X) 05 % 06 % phat = [m] Parameter (see wexpcdf) estimated from 07 % the plot by least squares method 08 % X = data vector or matrix 09 % 10 % Example: 11 % R=wexprnd(2,1,100); 12 % phat=wexpplot(R) 13 % 14 % See also wexpcdf, wweibplot 15 16 x = x(:); 17 F=empdistr(x,[],0); 18 plot(F(:,1),-log(1-F(:,2)),'b.','markersize',12); 19 20 m = mean(x); 21 hold on 22 plot(F(:,1),1/m*F(:,1),'r--') 23 hold off 24 title(['Exponential Probability Plot, m=' num2str(m)]) 25 xlabel('x') 26 ylabel('-log(1-F)') 27 if nargout > 0, 28 phat=[m]; 29 end 30
Comments or corrections to the WAFO group