Mercurial > hg > octave-terminal
changeset 7221:2636c0846924
[project @ 2007-11-29 23:27:32 by dbateman]
author | dbateman |
---|---|
date | Thu, 29 Nov 2007 23:27:32 +0000 |
parents | 66081694ffb8 |
children | dd8b3bbeeaf9 |
files | scripts/plot/pareto.m |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/pareto.m +++ b/scripts/plot/pareto.m @@ -79,10 +79,10 @@ [x, idx] = sort (x, "descend"); y = y (idx); cdf = cumsum (x); - maxcdf = cdf(end); - cdf = cdf ./ cdf (end); + maxcdf = max(cdf); + cdf = cdf ./ maxcdf; [dummy, idx95] = min (abs (cdf - .95)); - idx95 - idx95(1); + idx95 = idx95(1); [ax, hbar, hline] = plotyy (ax, 1 : idx95, x (1 : idx95), 1 : length(cdf), 100 .* cdf,