Mercurial > hg > octave-lyh
diff test/build_sparse_tests.sh @ 7322:40a17a87155e
[project @ 2007-12-18 21:32:10 by jwe]
author | jwe |
---|---|
date | Tue, 18 Dec 2007 21:34:26 +0000 |
parents | 3f29467c1667 |
children | fcc6d853df9e |
line wrap: on
line diff
--- a/test/build_sparse_tests.sh +++ b/test/build_sparse_tests.sh @@ -811,6 +811,13 @@ %!assert(as((size(as,1):-1:1),:),sparse(af((size(af,1):-1:1),:))) %!assert(as(:,(size(as,2):-1:1)),sparse(af(:,(size(af,2):-1:1)))) +%% Indexing tests +%!assert(full(as([1,1],:)), af([1,1],:)) +%!assert(full(as(:,[1,1])), af(:,[1,1])) +%!test +%! [i,j,v] = find (as); +%! assert (as(i(1),j(1))([1,1]), sparse([v(1),v(1)])) + %% Assignment test %!test %! ts=as;ts(:,:)=ts(fliplr(1:size(as,1)),:);