Functions | |
if (nargin==3) if(!strcmpi(byrows_arg | |
rows | error ("expecting third argument to be \"rows\"") |
endif endif | if (byrows) if(nargout > 1)[c |
endif | if (!isempty(c)&&!isempty(b)) b |
c (idx(dups),:) | |
if (nargout > 1) i(idx(dups) | |
if (iscellstr(dummy)) dups | |
endif | c (idx(dups)) |
endif | if (size(c, 1)!=1 &&size(b, 1)==1) c |
endif endif endif endfunction | !assert (setdiff(["bb";"zz";"bb";"zz"],["bb";"cc";"bb"],"rows"),"zz")%!assert(setdiff(["b" |
z | !assert (setdiff(["b";"z";"b";"z"],["b";"c";"b"]),"z")%!assert(setdiff([1 |
z | !assert (setdiff([1;2;3;4],[1;2;4],"rows"), 3)%!assert(setdiff([1 |
z | !assert (setdiff({"one","two";"three","four"},{"one","two";"three","six"}),{"four"})%!test%!a |
!assert (y,[5]) | |
!assert (y, a(i)) | |
Variables | |
function [c, i] | |
endif | byrows = false |
endif endif | i = unique (a, "rows") |
else | c = unique (a, "rows") |
dups = sortrows ([c; b]) find (all (dummy(1:end-1,:) == dummy(2:end,:), 2)) | |
__pad12__ | |
z | |
b = [1, 2, 3, 4] | |
rows |
!assert | ( | y | , | |
a(i) | ||||
) |
!assert | ( | y | ) |
z !assert | ( | setdiff({"one","two";"three","four"},{"one","two";"three","six"}) | ) |
z !assert | ( | setdiff([1;2;3;4],[1;2;4],"rows") | , | |
3 | ||||
) |
z !assert | ( | setdiff(["b";"z";"b";"z"],["b";"c";"b"]) | , | |
"z" | ||||
) |
endif endif endif endfunction !assert | ( | setdiff(["bb";"zz";"bb";"zz"],["bb";"cc";"bb"],"rows") | , | |
"zz" | ||||
) |
c | ( | idx(dups) | , | |
: | ||||
) |
rows error | ( | "expecting third argument to be \"rows\"" | ) |
endif if | ( | size(c, 1)! | = 1 &&size(b, 1)==1 |
) |
if | ( | iscellstr(dummy) | ) |
if | ( | nargout | , | |
1 | ||||
) |
endif if | ( | ! | isemptyc)&&!isempty(b | ) |
if | ( | nargin | = = 3 |
) |
b = [1, 2, 3, 4] |
else c = unique (a, "rows") |
function[c, i] |
z rows |
z |