Mercurial > hg > octave-terminal
changeset 12930:7bd29d875af1
mode.m: Eliminate cellfun usage in assert tests
* mode.m: Eliminate cellfun usage in assert tests
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Fri, 05 Aug 2011 20:36:10 -0700 |
parents | 135ec8155eeb |
children | cefd568ea073 |
files | scripts/statistics/base/mode.m |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/statistics/base/mode.m +++ b/scripts/statistics/base/mode.m @@ -112,7 +112,9 @@ %! [m2, f2, c2] = mode (full (a)); %! assert (m, sparse (m2)); %! assert (f, sparse (f2)); -%! assert (c, cellfun (@(x) sparse (0), c2, 'uniformoutput', false)); +%! c_exp(1:length(a)) = { sparse (0) }; +%! assert (c ,c_exp); +%! assert (c2,c_exp ); %!assert(mode ([2,3,1,2,3,4],1),[2,3,1,2,3,4]); %!assert(mode ([2,3,1,2,3,4],2),2);