home *** CD-ROM | disk | FTP | other *** search
- % function vecout = comple(vecin,n)
- % VECOUT is the complementary (to VECIN) set of
- % integers, with respect to the set 1:n. VECOUT
- % is returned as a row vector. subroutine for
- % INDVCMP.
-
- function out = comple(in,n)
- in = sort(in);
- out = [];
- lout = n - length(in);
- if in(1) ~= 1;
- out = 1:in(1)-1;
- end
- for i=2:length(in)
- out = [out in(i-1)+1:in(i)-1];
- end
- out = [out (in(length(in))+1):n];
- %
- % Copyright MUSYN INC 1991, All Rights Reserved
-