comparison scripts/set/complement.m @ 8887:6e4a811e58f8

deprecate create_set
author John W. Eaton <jwe@octave.org>
date Fri, 27 Feb 2009 14:49:28 -0500
parents 6f2d95255911
children ca032de5fbf2
comparison
equal deleted inserted replaced
8886:0c1a9c178fdd 8887:6e4a811e58f8
38 if (nargin != 2) 38 if (nargin != 2)
39 print_usage (); 39 print_usage ();
40 endif 40 endif
41 41
42 if (isempty (a)) 42 if (isempty (a))
43 y = create_set(b); 43 y = unique (b);
44 elseif (isempty (b)) 44 elseif (isempty (b))
45 y = []; 45 y = [];
46 else 46 else
47 a = create_set (a); 47 a = unique (a);
48 b = create_set (b); 48 b = unique (b);
49 yindex = 1; 49 yindex = 1;
50 y = zeros (1, length (b)); 50 y = zeros (1, length (b));
51 for index = 1:length (b) 51 for index = 1:length (b)
52 if (all (a != b (index))) 52 if (all (a != b (index)))
53 y(yindex++) = b(index); 53 y(yindex++) = b(index);