Home > wafo > wstats > wexpplot.m

wexpplot

PURPOSE ^

Plots data on a Exponential distribution paper

SYNOPSIS ^

phat = wexpplot(x)

DESCRIPTION ^

 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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group


Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003