Mercurial > hg > camir-aes2014
annotate 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 |
rev | line source |
---|---|
wolffd@0 | 1 function p=mysubset(small,large) |
wolffd@0 | 2 % MYSUBSET Is the small set of +ve integers a subset of the large set? |
wolffd@0 | 3 % p = mysubset(small, large) |
wolffd@0 | 4 |
wolffd@0 | 5 % Surprisingly, this is not built-in. |
wolffd@0 | 6 |
wolffd@0 | 7 if isempty(small) |
wolffd@0 | 8 p = 1; % isempty(large); |
wolffd@0 | 9 else |
wolffd@0 | 10 p = length(myintersect(small,large)) == length(small); |
wolffd@0 | 11 end |