download plotempd.m
Language: Matlab
LOC: 31
Project Info
MatLinks/Chorus(matlinks)
Server: SourceForge
Type: cvs
...chest\copyleft\gpl\stixbox\
   bincoef.m
   cat2tbl.m
   ciboot.m
   ciquant.m
   cmpmod.m
   Contents.m
   contincy.m
   corr.m
   covboot.m
   covjack.m
   cvar.m
   datas1.m
   datas10.m
   datas11.m
   datas2.m
   datas3.m
   datas4.m
   datas5.m
   datas6.m
   datas7.m
   datas8.m
   datas9.m
   dbeta.m
   dbinom.m
   dchisq.m
   df.m
   dgamma.m
   dgumbel.m
   dhypg.m
   dlognorm.m
   dnorm.m
   dt.m
   dweib.m
   egumbel.m
   getdata.m
   histo.m
   identif5.m
   identify.m
   kaplamai.m
   ldiscrim.m
   linreg.m
   lodds.m
   loddsinv.m
   logitfit.m
   lsfit.m
   lsselect.m
   normmix.m
   octvinit.m
   pairs.m
   pbeta.m
   pbinom.m
   pchisq.m
   pf.m
   pgamma.m
   pgumbel.m
   phypg.m
   plognorm.m
   plotdens.m
   plotempd.m
   plotsym.m
   pnorm.m
   pt.m
   pweib.m
   qbeta.m
   qbinom.m
   qchisq.m
   qf.m
   qgamma.m
   qgumbel.m
   qhypg.m
   qlognorm.m
   qnorm.m
   qqgamma.m
   qqgumbel.m
   qqnorm.m
   qqplot.m
   qqweib.m
   qt.m
   quantile.m
   qweib.m
   ranktrf.m
   rbeta.m
   rbinom.m
   rboot.m
   rchisq.m
   Readme.m
   rf.m
   rgamma.m
   rgumbel.m
   rhypg.m
   rlognorm.m
   rnorm.m
   rt.m
   rweib.m
   spearman.m
   stdboot.m
   stdize.m
   stdjack.m
   stixdemo.m
   test1b.m
   test1n.m
   test1r.m
   test2n.m
   test2r.m

function  plotempd(x,method)
%PLOTEMPD Plot empirical distribution.
%
%         plotempd(x)
%         plotempd(x, method)
%	  
%	  The method (default 3) is
%	  1. Interpolation so that F(X_(k)) == (k-0.5)/n.
%	  2. Interpolation so that F(X_(k)) == k/(n+1).
%	  3. The empirical distribution.
%
%	  If input  x  is a matrix then every column is treated
%	  as a separate distribution and plotted independently.

%       Copyright (c) Anders Holtsberg, 1998

if nargin < 2
   method = 3; 
end
h = ishold;

if size(x,1) == 1
   x = x';
end
n = size(x,1);
x = sort(x);

if method == 1 | method == 2
   if method == 1
      p = (0.5:n-0.5)/n;
   else
      p = (1:n)/(n+1);
   end
   for i = 1:size(x,2)
      plot(x(:,i),p)
      hold on
   end
elseif method == 3
   x = [x(1,:); x];
   p = (0:n)/n;
   for i = 1:size(x,2)
      stairs(x(:,i),p)
      hold on
   end
else
   error('Hey, argument 2 is not a method!')
end
if h, hold on, else hold off, end

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us