diff scripts/set/setdiff.m @ 5963:b3478d7a0486

[project @ 2006-08-24 17:09:18 by jwe]
author jwe
date Thu, 24 Aug 2006 17:09:18 +0000
parents 9c3c903f037e
children d542d9197839
line wrap: on
line diff
--- a/scripts/set/setdiff.m
+++ b/scripts/set/setdiff.m
@@ -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(find (dummy(1:n-1) == dummy(2:n))), :) = [];
+      c(idx(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(find (dummy(1:n-1) == dummy(2:n)))) = [];
+      c(idx(dummy(1:n-1) == dummy(2:n))) = [];
       ## Reshape if necessary.
       if (size (c, 1) != 1 && size (b, 1) == 1)
 	c = c.';