comparison toolboxes/FullBNT-1.0.7/KPMtools/mysubset.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function p=mysubset(small,large)
2 % MYSUBSET Is the small set of +ve integers a subset of the large set?
3 % p = mysubset(small, large)
4
5 % Surprisingly, this is not built-in.
6
7 if isempty(small)
8 p = 1; % isempty(large);
9 else
10 p = length(myintersect(small,large)) == length(small);
11 end