diff options
Diffstat (limited to 'sourcecodes/bnt-master/KPMtools/mysubset.m')
| -rw-r--r-- | sourcecodes/bnt-master/KPMtools/mysubset.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sourcecodes/bnt-master/KPMtools/mysubset.m b/sourcecodes/bnt-master/KPMtools/mysubset.m new file mode 100644 index 00000000..a3a2ccd2 --- /dev/null +++ b/sourcecodes/bnt-master/KPMtools/mysubset.m @@ -0,0 +1,11 @@ +function p=mysubset(small,large) +% MYSUBSET Is the small set of +ve integers a subset of the large set? +% p = mysubset(small, large) + +% Surprisingly, this is not built-in. + +if isempty(small) + p = 1; % isempty(large); +else + p = length(myintersect(small,large)) == length(small); +end |
