Navigation

Operators and Keywords

Function List:

C++ API

complement.m File Reference


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

Function Documentation

!assert ( isempty(complement([1, 2, 3],[3, 2, 1]))   ) 

!assert ( all(all(complement([1, 2, 3],[3, 4, 5, 6])==[4, 5, 6]))   ) 

endif endfunction !assert ( all(all(complement([1, 2, 3],[3;4;5;6])==[4, 5, 6]))   ) 

!error complement ( ,
,
 
)

!error complement (  ) 

elseif ( isempty(b)   ) 

endif if ( isempty(a)   ) 


Variable Documentation

else a = unique (a)

b = unique (b)

for index

Initial value:

 1:length (b)
      if (all (a != b (index)))
        y(yindex++) = b(index)

Initial value:

yindex = 1