
function out = cdf_plot(k,DAT)

%CDF_PLOT plots out cdf and envelopes for selected points
%from data output of cdf_env.

%Writen by: TONY E. SMITH, 2/4/98
%
%INPUTS: 
%       (i)   k = point 'k' of the n1 samples, k = 1,..,n1.
%       (ii)  DAT = cell(1x4) with 
%             (a) DAT{1} = matrix of cdf's 
%             (b) DAT{2} = matrix of upper envelopes 
%             (c) DAT{3} = matrix of lower envelopes
%             (d) DAT{4} = vector of distances

%OUTPUT: plot of CDF and envelopes for point k .

CDF = DAT{1} ;
U   = DAT{2} ;
L   = DAT{3} ;
D   = DAT{4} ;

F = CDF(k,:)  ; 

High = U(k,:) ; 

Low = L(k,:)  ;

plot(D,F,'r',D,High,'b',D,Low,'g') 

