From: <sch...@us...> - 2010-11-17 08:34:19
|
Revision: 7925 http://octave.svn.sourceforge.net/octave/?rev=7925&view=rev Author: schloegl Date: 2010-11-17 08:34:13 +0000 (Wed, 17 Nov 2010) Log Message: ----------- improve display of CDF Modified Paths: -------------- trunk/octave-forge/extra/NaN/inst/cdfplot.m Property Changed: ---------------- trunk/octave-forge/extra/NaN/inst/cdfplot.m Modified: trunk/octave-forge/extra/NaN/inst/cdfplot.m =================================================================== --- trunk/octave-forge/extra/NaN/inst/cdfplot.m 2010-11-17 08:19:15 UTC (rev 7924) +++ trunk/octave-forge/extra/NaN/inst/cdfplot.m 2010-11-17 08:34:13 UTC (rev 7925) @@ -16,7 +16,7 @@ % $Id$ % Copyright (C) 2009,2010 by Alois Schloegl <a.s...@ie...> % This function is part of the NaN-toolbox -% http://biosig-consulting.com/matlab/NaN/ +% http://pub.ist.ac.at/~schloegl/matlab/NaN/ % This program is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License @@ -33,8 +33,11 @@ % Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -his = histo3(X(:)); -hh = plot(his.X,cumsum(his.H)/sum(his.H)); +his = histo_mex(X(:)); +cdf = cumsum(his.H,1) ./ sum(his.H,1); +ix1 = ceil ([1:2*size(his.X,1)]'/2); +ix2 = floor([2:2*size(his.X,1)]'/2); +hh = plot (his.X(ix1), [0; cdf(ix2)]); if nargout>0, h = hh; Property changes on: trunk/octave-forge/extra/NaN/inst/cdfplot.m ___________________________________________________________________ Added: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |