comparison 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
comparison
equal deleted inserted replaced
7321:359f464342b3 7322:40a17a87155e
809 %!assert(as(:,cidx), sparse(af(:,cidx))) 809 %!assert(as(:,cidx), sparse(af(:,cidx)))
810 %!assert(as(:,:), sparse(af(:,:))) 810 %!assert(as(:,:), sparse(af(:,:)))
811 %!assert(as((size(as,1):-1:1),:),sparse(af((size(af,1):-1:1),:))) 811 %!assert(as((size(as,1):-1:1),:),sparse(af((size(af,1):-1:1),:)))
812 %!assert(as(:,(size(as,2):-1:1)),sparse(af(:,(size(af,2):-1:1)))) 812 %!assert(as(:,(size(as,2):-1:1)),sparse(af(:,(size(af,2):-1:1))))
813 813
814 %% Indexing tests
815 %!assert(full(as([1,1],:)), af([1,1],:))
816 %!assert(full(as(:,[1,1])), af(:,[1,1]))
817 %!test
818 %! [i,j,v] = find (as);
819 %! assert (as(i(1),j(1))([1,1]), sparse([v(1),v(1)]))
820
814 %% Assignment test 821 %% Assignment test
815 %!test 822 %!test
816 %! ts=as;ts(:,:)=ts(fliplr(1:size(as,1)),:); 823 %! ts=as;ts(:,:)=ts(fliplr(1:size(as,1)),:);
817 %! tf=af;tf(:,:)=tf(fliplr(1:size(af,1)),:); 824 %! tf=af;tf(:,:)=tf(fliplr(1:size(af,1)),:);
818 %! assert(ts,sparse(tf)); 825 %! assert(ts,sparse(tf));