From bug-request at octave dot org Thu Apr 6 15:46:41 2006 Subject: 2.1.72: hist.m doesn't handle NaN values From: "John W. Eaton" To: Olli Saarela Cc: bug at octave dot org Date: Thu, 6 Apr 2006 16:46:13 -0400 On 21-Mar-2006, Olli Saarela wrote: | NaN values should be ignored in histograms, but hist.m counts them in | the last bin. The following is in 2.1.72 / Cygwin put together by | Agustin Barto (thanks!). The CVS version looks like it has the same problem. | | >> [hi,bins]=hist([1 1 1 2 2 3],[1 2 3]) | hi = | 3 2 1 | bins = | 1 2 3 | | >> [hi,bins]=hist([1 1 1 NaN NaN NaN 2 2 3],[1 2 3]) | hi = | 3 2 4 | bins = | 1 2 3 Thanks, I applied the patch. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------