Navigation

Operators and Keywords

Function List:

C++ API

pareto.m File Reference


Functions

 if (nargin==2) y
 if (!iscell(y)) if(ischar(y)) y
 axis (ax(1),[1-0.6, idx95+0.6, 0, maxcdf])
 axis (ax(2),[1-0.6, idx95+0.6, 0, 100])
 set (ax(2),"ytick",[0, 20, 40, 60, 80, 100],"yticklabel",{"0%","20%","40%","60%","80%","100%"})
 set (ax(1),"xtick", 1:idx95,"xticklabel", y(1:idx95))
 set (ax(2),"xtick", 1:idx95,"xticklabel", y(1:idx95))
 if (nargout > 0) h
endif endfunction!demo!clf !colormap (jet(64))%!Cheese
 !pareto (Sold, Cheese)
 !pareto (Value.*SoldUnits, Codes)

Variables

function h
endif x = varargin {1}(:).'
else y = cellfun (@(x) num2str (x), num2cell (y), "UniformOutput", false)
 endif [x, idx] = sort (x, "descend")
 cdf = cumsum (x)
 maxcdf = max(cdf)
 cdf95 = cdf - 0.95
 idx95 = find(sign(cdf95(1:end-1)) != sign(cdf95(2:end)))(1)
 hline
 !Sold = [105, 30, 70, 10, 15, 20]
!demo!clf Suppose that we want
establish which products makes
of turnover 
!Codes = {"AB4","BD7","CF8","CC5","AD11","BB5","BB3","AD8","DF3","DE7"}
 !Value = [2.35 7.9 2.45 1.1 0.15 13.45 5.4 2.05 0.85 1.65]'
 !SoldUnits

Function Documentation

endif endfunction !demo ! clf !colormap ( jet(64)   ) 

!pareto ( Value.*  SoldUnits,
Codes   
)

!pareto ( Sold  ,
Cheese   
)

axis ( ax(2)   ) 

axis ( ax(1)   ) 

if ( nargout  ,
 
)

if ( iscelly  ) 

if ( nargin  = =2  ) 

set ( ax(2)  ,
"xtick"  ,
1:idx95  ,
"xticklabel"  ,
y(1:idx95  
)

set ( ax(1)  ,
"xtick"  ,
1:idx95  ,
"xticklabel"  ,
y(1:idx95  
)

set ( ax(2)  ,
"ytick"  ,
"yticklabel"   
)


Variable Documentation

!demo ! clf Suppose that we want establish which products makes of turnover !Codes = {"AB4","BD7","CF8","CC5","AD11","BB5","BB3","AD8","DF3","DE7"}

!Sold = [105, 30, 70, 10, 15, 20]

!SoldUnits

Initial value:

 [54723 41114 16939 1576091 168000 687197 120222 168195, ...
%!              1084118 55576]'

!Value = [2.35 7.9 2.45 1.1 0.15 13.45 5.4 2.05 0.85 1.65]'

cdf = cumsum (x)

cdf95 = cdf - 0.95

endif[x, idx] = sort (x, "descend")

Initial value:

 pareto (varargin)

  if (nargin != 1 && nargin != 2)
    print_usage ()

idx95 = find(sign(cdf95(1:end-1)) != sign(cdf95(2:end)))(1)

maxcdf = max(cdf)

endif x = varargin {1}(:).'

y = cellfun (@(x) num2str (x), num2cell (y), "UniformOutput", false)