matthiasm@8: function p=mysubset(small,large) matthiasm@8: % MYSUBSET Is the small set of +ve integers a subset of the large set? matthiasm@8: % p = mysubset(small, large) matthiasm@8: matthiasm@8: % Surprisingly, this is not built-in. matthiasm@8: matthiasm@8: if isempty(small) matthiasm@8: p = 1; % isempty(large); matthiasm@8: else matthiasm@8: p = length(myintersect(small,large)) == length(small); matthiasm@8: end