# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1336597176 14400 # Node ID 545580e7ebfa2b187931fae550293fd93be67022 # Parent f2ed09ae8d3f4bab206a70ebaadbc877ce36e06b hist.m: Normalise by number of non-NaN entries diff -r f2ed09ae8d3f -r 545580e7ebfa scripts/plot/hist.m --- a/scripts/plot/hist.m Tue May 08 21:03:42 2012 -0700 +++ b/scripts/plot/hist.m Wed May 09 16:59:36 2012 -0400 @@ -149,7 +149,7 @@ if (nargin > 2 && ! ischar (varargin{iarg})) ## Normalise the histogram. norm = varargin{iarg++}; - freq = freq / rows (y) * norm; + freq = freq / sum(! isnan (y)) * norm; endif if (nargout > 0)