From: <sch...@us...> - 2009-09-02 07:27:54
|
Revision: 6197 http://octave.svn.sourceforge.net/octave/?rev=6197&view=rev Author: schloegl Date: 2009-09-02 07:27:47 +0000 (Wed, 02 Sep 2009) Log Message: ----------- fix category for NaN Modified Paths: -------------- trunk/octave-forge/extra/NaN/inst/cat2bin.m Modified: trunk/octave-forge/extra/NaN/inst/cat2bin.m =================================================================== --- trunk/octave-forge/extra/NaN/inst/cat2bin.m 2009-09-01 18:58:04 UTC (rev 6196) +++ trunk/octave-forge/extra/NaN/inst/cat2bin.m 2009-09-02 07:27:47 UTC (rev 6197) @@ -55,13 +55,15 @@ BLab = []; for m = 1:size(D,2) h = histo_mex(D(:,m)); - x = h.X(h.H>0); + x = h.X(h.H>0); if isempty(MODE) x = x(x==x); end; for k = 1:size(D,1), if ~isnan(D(k,m)) B(k, c + find(D(k,m)==x)) = 1; + elseif isnan(x(end)), + B(k,c+length(x)) = 1; end; end; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |