blob: a3a2ccd2ed81af019cab111718055612557836cb (
plain)
1
2
3
4
5
6
7
8
9
10
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
|