# HG changeset patch # User jwe # Date 1134610174 0 # Node ID 3d9ddfdc6d3ec78e3158651db1630bffad2bc616 # Parent 8eebdcfde94ee666bbd85fbae96c7d342e1bbcf0 [project @ 2005-12-15 01:29:34 by jwe] diff -r 8eebdcfde94e -r 3d9ddfdc6d3e scripts/plot/hist.m --- a/scripts/plot/hist.m Thu Dec 15 01:16:39 2005 +0000 +++ b/scripts/plot/hist.m Thu Dec 15 01:29:34 2005 +0000 @@ -139,8 +139,8 @@ %! assert(nn, [2,1,1]); %!test %! [nn,xx]=hist([1:4]',3); -%! assert(xx, [1.5,2.5,3.5]'); -%! assert(nn, [2,1,1]'); +%! assert(xx, [1.5,2.5,3.5]); +%! assert(nn, [2,1,1]); %!test %! [nn,xx]=hist([[1:4]',[1:4]'],3); %! assert(xx, [[1.5,2.5,3.5]',[1.5,2.5,3.5]']); diff -r 8eebdcfde94e -r 3d9ddfdc6d3e scripts/sparse/spstats.m --- a/scripts/sparse/spstats.m Thu Dec 15 01:16:39 2005 +0000 +++ b/scripts/sparse/spstats.m Thu Dec 15 01:29:34 2005 +0000 @@ -10,7 +10,7 @@ ## is the mean of the non-zeros in each column, and @var{var} is the ## variance of the non-zeros in each column. ## -## Called with two output arguments, if @var{s} is the data and @var{j} +## Called with two input arguments, if @var{s} is the data and @var{j} ## is the bin number for the data, compute the stats for each bin. In ## this case, bins can contain data values of zero, whereas with ## @code{spstats (@var{s})} the zeros may disappear. @@ -21,14 +21,14 @@ usage("[count, mean, var] = spstats(S) OR spstats(x,j)"); endif - [n, m] = size (S); if nargin == 1 - [i,j,v] = spfind (S); + [i,j,v] = find (S); else v = S; i = 1:length (v); S = sparse (i, j, v); endif + [n, m] = size (S); count = spsum (sparse (i, j, 1, n, m)); if (nargout > 1)