# HG changeset patch # User Rik # Date 1305469454 25200 # Node ID 72e60cf50dce3be3fa021ed58f831b70e3738177 # Parent 48b9e8344a03c01a775f1e80e6f98a99c0b60d7d nonzeros.m: Ignore unused return arguments from find(). * nonzeros.m: Ignore unused return arguments from find(). diff -r 48b9e8344a03 -r 72e60cf50dce scripts/sparse/nonzeros.m --- a/scripts/sparse/nonzeros.m Tue May 10 22:31:24 2011 -0700 +++ b/scripts/sparse/nonzeros.m Sun May 15 07:24:14 2011 -0700 @@ -27,12 +27,13 @@ print_usage (); endif - [i, j, t] = find (s); + [~, ~, t] = find (s); t = t(:); endfunction + %!assert(nonzeros([1,2;3,0]),[1;3;2]) %!assert(nonzeros([1,2,3,0]),[1;2;3]) %!assert(nonzeros(sparse([1,2;3,0])),[1;3;2])