function y = imintest(pm) % IMINTEST y = imintest(pm) Checks minterm probs for independence % Version of 1/25//96 % Checks minterm probabilities for independence % Uses the m-functions mintable and minprob m = length(pm); n = round(log(m)/log(2)); if m ~= 2^n y = 'The number of minterm probabilities is incorrect'; else P = mintable(n)*pm'; pt = minprob(P'); a = fix(n/2); s = abs(pm - pt) > 1e-7; if sum(s) > 0 disp('The class is NOT independent') disp('Minterms for which the product rule fails') y = reshape(s,2^a,2^(n-a)); else y = 'The class is independent'; end end