changeset 5967:d542d9197839 ss-2-9-8

[project @ 2006-08-24 21:24:53 by jwe]
author jwe
date Thu, 24 Aug 2006 21:27:41 +0000
parents be252143f5e1
children 5c5056e9bd9a
files scripts/ChangeLog scripts/set/setdiff.m
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Thu Aug 24 20:06:24 2006 +0000
+++ b/scripts/ChangeLog	Thu Aug 24 21:27:41 2006 +0000
@@ -5,7 +5,7 @@
 
 2006-08-24  Søren Hauberg  <soren@hauberg.org>
 
-	* miscellaneous/bincoeff.m, set/setdiff.m, specfun/factorial.m:
+	* miscellaneous/bincoeff.m, specfun/factorial.m:
 	Use logical indexing instead of indices computed by calling find
 	on the logical index.
 
--- a/scripts/set/setdiff.m	Thu Aug 24 20:06:24 2006 +0000
+++ b/scripts/set/setdiff.m	Thu Aug 24 21:27:41 2006 +0000
@@ -56,7 +56,7 @@
       [dummy, idx] = sortrows ([c; b]);
       ## Eliminate those elements of a that are the same as in b.
       n = length (dummy);
-      c(idx(dummy(1:n-1) == dummy(2:n)), :) = [];
+      c(idx(find (dummy(1:n-1) == dummy(2:n))), :) = [];
     endif
   else
     c = unique (a);
@@ -66,7 +66,7 @@
       [dummy, idx] = sort ([c(:); b(:)]);
       ## Eliminate those elements of a that are the same as in b.
       n = length (dummy);
-      c(idx(dummy(1:n-1) == dummy(2:n))) = [];
+      c(idx(find (dummy(1:n-1) == dummy(2:n)))) = [];
       ## Reshape if necessary.
       if (size (c, 1) != 1 && size (b, 1) == 1)
 	c = c.';