Functions | |
endif | if (isempty(a)) y |
elseif (isempty(b)) y | |
endif endfunction | !assert (all(all(complement([1, 2, 3],[3;4;5;6])==[4, 5, 6]))) |
!assert (all(all(complement([1, 2, 3],[3, 4, 5, 6])==[4, 5, 6]))) | |
!assert (isempty(complement([1, 2, 3],[3, 2, 1]))) | |
!error | complement (1) |
!error | complement (1, 2, 3) |
Variables | |
function | y |
else | a = unique (a) |
b = unique (b) | |
yindex = 1 | |
for | index |
!assert | ( | isempty(complement([1, 2, 3],[3, 2, 1])) | ) |
endif endfunction !assert | ( | all(all(complement([1, 2, 3],[3;4;5;6])==[4, 5, 6])) | ) |
!error complement | ( | 1 | , | |
2 | , | |||
3 | ||||
) |
!error complement | ( | 1 | ) |
elseif | ( | isempty(b) | ) |
endif if | ( | isempty(a) | ) |
else a = unique (a) |
b = unique (b) |
Initial value:
complement (a, b) if (nargin != 2) print_usage ()
yindex = 1 |