comparison scripts/set/setdiff.m @ 11587:c792872f8942

all script files: untabify and strip trailing whitespace
author John W. Eaton <jwe@octave.org>
date Thu, 20 Jan 2011 17:35:29 -0500
parents fd0a3ac60b0e
children 72c96de7a403
comparison
equal deleted inserted replaced
11586:12df7854fa7c 11587:c792872f8942
85 if (size (c, 1) != 1 && size (b, 1) == 1) 85 if (size (c, 1) != 1 && size (b, 1) == 1)
86 c = c.'; 86 c = c.';
87 endif 87 endif
88 endif 88 endif
89 endif 89 endif
90 90
91 endfunction 91 endfunction
92 92
93 %!assert(setdiff(["bb";"zz";"bb";"zz"],["bb";"cc";"bb"],"rows"), "zz") 93 %!assert(setdiff(["bb";"zz";"bb";"zz"],["bb";"cc";"bb"],"rows"), "zz")
94 %!assert(setdiff(["b";"z";"b";"z"],["b";"c";"b"],"rows"), "z") 94 %!assert(setdiff(["b";"z";"b";"z"],["b";"c";"b"],"rows"), "z")
95 %!assert(setdiff(["b";"z";"b";"z"],["b";"c";"b"]), "z") 95 %!assert(setdiff(["b";"z";"b";"z"],["b";"c";"b"]), "z")
96 %!assert(setdiff([1, 1; 2, 2; 3, 3; 4, 4], [1, 1; 2, 2; 4, 4], "rows"), [3 3]) 96 %!assert(setdiff([1, 1; 2, 2; 3, 3; 4, 4], [1, 1; 2, 2; 4, 4], "rows"), [3 3])
97 %!assert(setdiff([1; 2; 3; 4], [1; 2; 4], "rows"), 3) 97 %!assert(setdiff([1; 2; 3; 4], [1; 2; 4], "rows"), 3)